tiny-essentials 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/TinyBasicsEs.js +51 -14
  2. package/dist/TinyBasicsEs.min.js +1 -1
  3. package/dist/TinyCertCrypto.js +26497 -71362
  4. package/dist/TinyCertCrypto.min.js +1 -1
  5. package/dist/TinyCertCrypto.min.js.LICENSE.txt +0 -2
  6. package/dist/TinyCrypto.js +93 -70
  7. package/dist/TinyCrypto.min.js +1 -1
  8. package/dist/TinyEssentials.js +232 -136
  9. package/dist/TinyEssentials.min.js +1 -1
  10. package/dist/TinyLevelUp.js +9 -9
  11. package/dist/legacy/crypto/decrypt.cjs +1 -0
  12. package/dist/legacy/crypto/decrypt.mjs +1 -0
  13. package/dist/legacy/crypto/default.cjs +2 -0
  14. package/dist/legacy/crypto/default.mjs +1 -0
  15. package/dist/legacy/crypto/encrypt.cjs +2 -1
  16. package/dist/legacy/crypto/encrypt.mjs +1 -0
  17. package/dist/legacy/crypto/index.cjs +1 -1
  18. package/dist/legacy/crypto/index.mjs +1 -0
  19. package/dist/legacy/firebase/cookieSession.cjs +2 -0
  20. package/dist/legacy/firebase/cookieSession.mjs +1 -0
  21. package/dist/legacy/firebase/database/index.cjs +3 -0
  22. package/dist/legacy/firebase/database/index.mjs +1 -0
  23. package/dist/legacy/firebase/database/presence.cjs +3 -0
  24. package/dist/legacy/firebase/database/presence.mjs +1 -0
  25. package/dist/legacy/firebase/database/saveAsync.cjs +2 -0
  26. package/dist/legacy/firebase/database/saveAsync.mjs +1 -0
  27. package/dist/legacy/firebase/databaseEscape.cjs +3 -0
  28. package/dist/legacy/firebase/databaseEscape.mjs +1 -0
  29. package/dist/legacy/firebase/databaseLogger.cjs +3 -0
  30. package/dist/legacy/firebase/databaseLogger.mjs +1 -0
  31. package/dist/legacy/firebase/discord/api/addGuildMember.cjs +3 -0
  32. package/dist/legacy/firebase/discord/api/addGuildMember.mjs +1 -0
  33. package/dist/legacy/firebase/discord/api/getGuildWidget.cjs +3 -0
  34. package/dist/legacy/firebase/discord/api/getGuildWidget.mjs +1 -0
  35. package/dist/legacy/firebase/discord/api/getToken.cjs +3 -0
  36. package/dist/legacy/firebase/discord/api/getToken.mjs +1 -0
  37. package/dist/legacy/firebase/discord/api/getUser.cjs +3 -0
  38. package/dist/legacy/firebase/discord/api/getUser.mjs +1 -0
  39. package/dist/legacy/firebase/discord/api/getUserConnections.cjs +3 -0
  40. package/dist/legacy/firebase/discord/api/getUserConnections.mjs +1 -0
  41. package/dist/legacy/firebase/discord/api/getUserGuilds.cjs +3 -0
  42. package/dist/legacy/firebase/discord/api/getUserGuilds.mjs +1 -0
  43. package/dist/legacy/firebase/discord/api/index.cjs +3 -0
  44. package/dist/legacy/firebase/discord/api/index.mjs +1 -0
  45. package/dist/legacy/firebase/discord/api/refreshToken.cjs +3 -0
  46. package/dist/legacy/firebase/discord/api/refreshToken.mjs +1 -0
  47. package/dist/legacy/firebase/discord/api/revokeToken.cjs +3 -0
  48. package/dist/legacy/firebase/discord/api/revokeToken.mjs +1 -0
  49. package/dist/legacy/firebase/discord/config.cjs +2 -0
  50. package/dist/legacy/firebase/discord/config.mjs +1 -0
  51. package/dist/legacy/firebase/discord/firebase_redirect/index.cjs +3 -0
  52. package/dist/legacy/firebase/discord/firebase_redirect/index.mjs +1 -0
  53. package/dist/legacy/firebase/discord/firebase_redirect/login.cjs +2 -0
  54. package/dist/legacy/firebase/discord/firebase_redirect/login.mjs +1 -0
  55. package/dist/legacy/firebase/discord/firebase_redirect/logout.cjs +2 -0
  56. package/dist/legacy/firebase/discord/firebase_redirect/logout.mjs +1 -0
  57. package/dist/legacy/firebase/discord/get/authURLGenerator.cjs +3 -0
  58. package/dist/legacy/firebase/discord/get/authURLGenerator.mjs +1 -0
  59. package/dist/legacy/firebase/discord/get/cookie-session.cjs +3 -0
  60. package/dist/legacy/firebase/discord/get/cookie-session.mjs +1 -0
  61. package/dist/legacy/firebase/discord/get/credentials.cjs +2 -0
  62. package/dist/legacy/firebase/discord/get/credentials.mjs +1 -0
  63. package/dist/legacy/firebase/discord/get/errorValidator.cjs +3 -0
  64. package/dist/legacy/firebase/discord/get/errorValidator.mjs +1 -0
  65. package/dist/legacy/firebase/discord/get/index.cjs +3 -0
  66. package/dist/legacy/firebase/discord/get/index.mjs +1 -0
  67. package/dist/legacy/firebase/discord/get/randomAvatar.cjs +3 -0
  68. package/dist/legacy/firebase/discord/get/randomAvatar.mjs +1 -0
  69. package/dist/legacy/firebase/discord/http/index.cjs +3 -0
  70. package/dist/legacy/firebase/discord/http/index.mjs +1 -0
  71. package/dist/legacy/firebase/discord/http/login.cjs +3 -0
  72. package/dist/legacy/firebase/discord/http/login.mjs +1 -0
  73. package/dist/legacy/firebase/discord/http/logout.cjs +3 -0
  74. package/dist/legacy/firebase/discord/http/logout.mjs +1 -0
  75. package/dist/legacy/firebase/discord/http/redirect.cjs +3 -0
  76. package/dist/legacy/firebase/discord/http/redirect.mjs +1 -0
  77. package/dist/legacy/firebase/discord/http/refreshToken.cjs +3 -0
  78. package/dist/legacy/firebase/discord/http/refreshToken.mjs +1 -0
  79. package/dist/legacy/firebase/discord/index.cjs +3 -0
  80. package/dist/legacy/firebase/discord/index.mjs +1 -0
  81. package/dist/legacy/firebase/discord/template/cookie-session.cjs +3 -0
  82. package/dist/legacy/firebase/discord/template/cookie-session.mjs +1 -0
  83. package/dist/legacy/firebase/domainRedirect.cjs +2 -0
  84. package/dist/legacy/firebase/domainRedirect.mjs +1 -0
  85. package/dist/legacy/firebase/escape.cjs +2 -0
  86. package/dist/legacy/firebase/escape.mjs +1 -0
  87. package/dist/legacy/firebase/getDBAsync.cjs +2 -0
  88. package/dist/legacy/firebase/getDBAsync.mjs +1 -0
  89. package/dist/legacy/firebase/getDBData.cjs +3 -0
  90. package/dist/legacy/firebase/getDBData.mjs +1 -0
  91. package/dist/legacy/firebase/getDBValue.cjs +2 -0
  92. package/dist/legacy/firebase/getDBValue.mjs +1 -0
  93. package/dist/legacy/firebase/index.cjs +3 -0
  94. package/dist/legacy/firebase/index.mjs +1 -0
  95. package/dist/legacy/firebase/isEmulator.cjs +2 -0
  96. package/dist/legacy/firebase/isEmulator.mjs +1 -0
  97. package/dist/legacy/firebase/logger.cjs +3 -0
  98. package/dist/legacy/firebase/logger.mjs +1 -0
  99. package/dist/legacy/firebase/mySQL.cjs +3 -0
  100. package/dist/legacy/firebase/mySQL.mjs +1 -0
  101. package/dist/legacy/firebase/mysqlConnector/create.cjs +2 -0
  102. package/dist/legacy/firebase/mysqlConnector/create.mjs +1 -0
  103. package/dist/legacy/firebase/mysqlConnector/index.cjs +3 -0
  104. package/dist/legacy/firebase/mysqlConnector/index.mjs +1 -0
  105. package/dist/legacy/firebase/mysqlConnector/nextPrev.cjs +2 -0
  106. package/dist/legacy/firebase/mysqlConnector/nextPrev.mjs +1 -0
  107. package/dist/legacy/firebase/mysqlConnector/pagination.cjs +2 -0
  108. package/dist/legacy/firebase/mysqlConnector/pagination.mjs +1 -0
  109. package/dist/legacy/firebase/mysqlConnector/sameUser.cjs +3 -0
  110. package/dist/legacy/firebase/mysqlConnector/sameUser.mjs +1 -0
  111. package/dist/legacy/firebase/transactionDBAsync.cjs +2 -0
  112. package/dist/legacy/firebase/transactionDBAsync.mjs +1 -0
  113. package/dist/legacy/get/countObj.cjs +3 -0
  114. package/dist/legacy/get/countObj.mjs +1 -0
  115. package/dist/legacy/get/decimalColor.cjs +3 -0
  116. package/dist/legacy/get/decimalColor.mjs +1 -0
  117. package/dist/legacy/get/objType.cjs +2 -0
  118. package/dist/legacy/get/objType.mjs +1 -0
  119. package/dist/legacy/get/pagination.cjs +3 -0
  120. package/dist/legacy/get/pagination.mjs +1 -0
  121. package/dist/legacy/get/queryUrlByName.cjs +2 -0
  122. package/dist/legacy/get/queryUrlByName.mjs +1 -0
  123. package/dist/legacy/get/queryUrlJSON.cjs +2 -0
  124. package/dist/legacy/get/queryUrlJSON.mjs +1 -0
  125. package/dist/legacy/get/super_string_filter.cjs +3 -0
  126. package/dist/legacy/get/super_string_filter.mjs +1 -0
  127. package/dist/legacy/get/versionCheck.cjs +2 -1
  128. package/dist/legacy/get/versionCheck.mjs +1 -0
  129. package/dist/legacy/http/HTTP-1.0.cjs +2 -0
  130. package/dist/legacy/http/HTTP-1.0.mjs +1 -0
  131. package/dist/legacy/http/auth.cjs +2 -0
  132. package/dist/legacy/http/auth.mjs +1 -0
  133. package/dist/legacy/http/check_domain.cjs +2 -0
  134. package/dist/legacy/http/check_domain.mjs +1 -0
  135. package/dist/legacy/http/csrfTokenAnalyze.cjs +2 -0
  136. package/dist/legacy/http/csrfTokenAnalyze.mjs +1 -0
  137. package/dist/legacy/http/domainValidator.cjs +3 -0
  138. package/dist/legacy/http/domainValidator.mjs +1 -0
  139. package/dist/legacy/http/errorsCallback.cjs +2 -0
  140. package/dist/legacy/http/errorsCallback.mjs +1 -0
  141. package/dist/legacy/http/fetch/json.cjs +3 -0
  142. package/dist/legacy/http/fetch/json.mjs +1 -0
  143. package/dist/legacy/http/fetch/text.cjs +3 -0
  144. package/dist/legacy/http/fetch/text.mjs +1 -0
  145. package/dist/legacy/http/fileCache.cjs +3 -0
  146. package/dist/legacy/http/fileCache.mjs +1 -0
  147. package/dist/legacy/http/getDomainURL.cjs +3 -0
  148. package/dist/legacy/http/getDomainURL.mjs +1 -0
  149. package/dist/legacy/http/userIP.cjs +3 -0
  150. package/dist/legacy/http/userIP.mjs +1 -0
  151. package/dist/legacy/index.cjs +3 -0
  152. package/dist/legacy/index.mjs +1 -0
  153. package/dist/legacy/libs/arraySortPositions.cjs +2 -0
  154. package/dist/legacy/libs/arraySortPositions.mjs +1 -0
  155. package/dist/legacy/libs/capitalize.cjs +2 -0
  156. package/dist/legacy/libs/capitalize.mjs +1 -0
  157. package/dist/legacy/libs/convertBytes.cjs +2 -0
  158. package/dist/legacy/libs/convertBytes.mjs +1 -0
  159. package/dist/legacy/libs/custom_module_loader.cjs +3 -0
  160. package/dist/legacy/libs/custom_module_loader.mjs +1 -0
  161. package/dist/legacy/libs/dice.cjs +2 -0
  162. package/dist/legacy/libs/dice.mjs +1 -0
  163. package/dist/legacy/libs/markdown.cjs +2 -0
  164. package/dist/legacy/libs/markdown.mjs +1 -0
  165. package/dist/legacy/libs/percentage.cjs +2 -0
  166. package/dist/legacy/libs/percentage.mjs +1 -0
  167. package/dist/legacy/libs/regex/getLetter.cjs +2 -0
  168. package/dist/legacy/libs/regex/getLetter.mjs +1 -0
  169. package/dist/legacy/libs/replaceAsync.cjs +3 -0
  170. package/dist/legacy/libs/replaceAsync.mjs +3 -0
  171. package/dist/legacy/libs/rule3.cjs +2 -0
  172. package/dist/legacy/libs/rule3.mjs +1 -0
  173. package/dist/legacy/libs/userLevel.cjs +9 -9
  174. package/dist/legacy/libs/userLevel.d.mts +39 -16
  175. package/dist/legacy/libs/userLevel.mjs +9 -9
  176. package/dist/legacy/momentjs/getAge.cjs +3 -0
  177. package/dist/legacy/momentjs/getAge.mjs +1 -0
  178. package/dist/legacy/momentjs/index.cjs +1 -1
  179. package/dist/legacy/momentjs/index.mjs +1 -0
  180. package/dist/legacy/momentjs/timeDuration.cjs +3 -0
  181. package/dist/legacy/momentjs/timeDuration.mjs +1 -0
  182. package/dist/legacy/socket.io/antiFlood/index.cjs +1 -1
  183. package/dist/legacy/socket.io/antiFlood/index.mjs +1 -0
  184. package/dist/legacy/socket.io/antiFlood/install.cjs +3 -0
  185. package/dist/legacy/socket.io/antiFlood/install.mjs +1 -0
  186. package/dist/legacy/socket.io/antiFlood/verify.cjs +3 -0
  187. package/dist/legacy/socket.io/antiFlood/verify.mjs +1 -0
  188. package/dist/legacy/socket.io/cookie-session.cjs +2 -0
  189. package/dist/legacy/socket.io/cookie-session.mjs +1 -0
  190. package/dist/legacy/socket.io/discord.cjs +3 -0
  191. package/dist/legacy/socket.io/discord.mjs +1 -0
  192. package/dist/legacy/socket.io/index.cjs +3 -0
  193. package/dist/legacy/socket.io/index.mjs +1 -0
  194. package/dist/v1/basics/clock.cjs +43 -13
  195. package/dist/v1/basics/clock.mjs +31 -13
  196. package/dist/v1/basics/objFilter.cjs +4 -0
  197. package/dist/v1/basics/objFilter.mjs +3 -0
  198. package/dist/v1/basics/simpleMath.cjs +1 -1
  199. package/dist/v1/basics/simpleMath.mjs +1 -1
  200. package/dist/v1/libs/TinyCertCrypto.cjs +104 -45
  201. package/dist/v1/libs/TinyCertCrypto.d.mts +18 -16
  202. package/dist/v1/libs/TinyCertCrypto.mjs +68 -37
  203. package/dist/v1/libs/TinyCrypto.cjs +70 -33
  204. package/dist/v1/libs/TinyCrypto.d.mts +64 -26
  205. package/dist/v1/libs/TinyCrypto.mjs +54 -38
  206. package/package.json +1 -1
  207. package/webpack.config.mjs +0 -69
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see TinyEssentials.min.js.LICENSE.txt */
2
- (()=>{var __webpack_modules__={20:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(7108),a=r(6737),s=r(6698),o=r(5359),h=r(4847),u=r(2951);function f(t){a.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){a.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){return new f(t)}function d(t){return new l(t)}Object.keys(u).forEach((function(t){u[t].id=i.from(u[t].id,"hex"),u[t.toLowerCase()]=u[t]})),s(f,a.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),i=o(r,t,this._hashType,this._signType,this._tag);return e?i.toString(e):i},s(l,a.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},l.prototype.verify=function(t,e,r){var n="string"==typeof e?i.from(e,r):e;this.end();var a=this._hash.digest();return h(n,a,t,this._signType,this._tag)},t.exports={Sign:c,Verify:d,createSign:c,createVerify:d}},82:(t,e,r)=>{var i=r(6698),n=r(8287).Buffer,a=r(7568),s=a.base,o=a.constants.der;function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){s.Node.call(this,"der",t)}function f(t){return t<10?"0"+t:t}t.exports=h,h.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},i(u,s.Node),u.prototype._encodeComposite=function(t,e,r,i){var a,s=function(t,e,r,i){var n;if("seqof"===t?t="seq":"setof"===t&&(t="set"),o.tagByName.hasOwnProperty(t))n=o.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);n=t}return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=o.tagClassByName[r||"universal"]<<6)}(t,e,r,this.reporter);if(i.length<128)return(a=new n(2))[0]=s,a[1]=i.length,this._createEncoderBuffer([a,i]);for(var h=1,u=i.length;u>=256;u>>=8)h++;(a=new n(2+h))[0]=s,a[1]=128|h,u=1+h;for(var f=i.length;f>0;u--,f>>=8)a[u]=255&f;return this._createEncoderBuffer([a,i])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new n(2*t.length),i=0;i<t.length;i++)r.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var i=0;i<t.length;i++)t[i]|=0}else if(Array.isArray(t))for(t=t.slice(),i=0;i<t.length;i++)t[i]|=0;if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var a=0;for(i=0;i<t.length;i++){var s=t[i];for(a++;s>=128;s>>=7)a++}var o=new n(a),h=o.length-1;for(i=t.length-1;i>=0;i--)for(s=t[i],o[h--]=127&s;(s>>=7)>0;)o[h--]=128|127&s;return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){var r,i=new Date(t);return"gentime"===e?r=[f(i.getFullYear()),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(i.getFullYear()%100),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!n.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new n(r)}if(n.isBuffer(t)){var i=t.length;0===t.length&&i++;var a=new n(i);return t.copy(a),0===t.length&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var s=t;s>=256;s>>=8)i++;for(s=(a=new Array(i)).length-1;s>=0;s--)a[s]=255&t,t>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new n(a))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var i,n=this._baseState;if(null===n.default)return!1;var a=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),a.length!==n.defaultBuffer.length)return!1;for(i=0;i<a.length;i++)if(a[i]!==n.defaultBuffer[i])return!1;return!0}},125:(t,e,r)=>{var i=r(4050),n=r(1241),a=r(530),s=r(2438),o=r(8078);function h(t,e,r){if(t=t.toLowerCase(),a[t])return n.createCipheriv(t,e,r);if(s[t])return new i({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function u(t,e,r){if(t=t.toLowerCase(),a[t])return n.createDecipheriv(t,e,r);if(s[t])return new i({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,i;if(t=t.toLowerCase(),a[t])r=a[t].key,i=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,i=s[t].iv}var n=o(e,!1,r,i);return h(t,n.key,n.iv)},e.createCipheriv=e.Cipheriv=h,e.createDecipher=e.Decipher=function(t,e){var r,i;if(t=t.toLowerCase(),a[t])r=a[t].key,i=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,i=s[t].iv}var n=o(e,!1,r,i);return u(t,n.key,n.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(n.getCiphers())}},149:(t,e,r)=>{var i=r(276);r(9504),r(1696),r(1267),r(1598),r(7619);var n=t.exports=i.ssh=i.ssh||{};function a(t,e){var r=e.toString(16);r[0]>="8"&&(r="00"+r);var n=i.util.hexToBytes(r);t.putInt32(n.length),t.putBytes(n)}function s(t,e){t.putInt32(e.length),t.putString(e)}function o(){for(var t=i.md.sha1.create(),e=arguments.length,r=0;r<e;++r)t.update(arguments[r]);return t.digest()}n.privateKeyToPutty=function(t,e,r){var n="ssh-rsa",h=""===(e=e||"")?"none":"aes256-cbc",u="PuTTY-User-Key-File-2: "+n+"\r\n";u+="Encryption: "+h+"\r\n",u+="Comment: "+(r=r||"")+"\r\n";var f=i.util.createBuffer();s(f,n),a(f,t.e),a(f,t.n);var l=i.util.encode64(f.bytes(),64),c=Math.floor(l.length/66)+1;u+="Public-Lines: "+c+"\r\n",u+=l;var d,p=i.util.createBuffer();if(a(p,t.d),a(p,t.p),a(p,t.q),a(p,t.qInv),e){var m=p.length()+16-1;m-=m%16;var g=o(p.bytes());g.truncate(g.length()-m+p.length()),p.putBuffer(g);var y=i.util.createBuffer();y.putBuffer(o("\0\0\0\0",e)),y.putBuffer(o("\0\0\0",e));var v=i.aes.createEncryptionCipher(y.truncate(8),"CBC");v.start(i.util.createBuffer().fillWithByte(0,16)),v.update(p.copy()),v.finish();var b=v.output;b.truncate(16),d=i.util.encode64(b.bytes(),64)}else d=i.util.encode64(p.bytes(),64);u+="\r\nPrivate-Lines: "+(c=Math.floor(d.length/66)+1)+"\r\n",u+=d;var w=o("putty-private-key-file-mac-key",e),M=i.util.createBuffer();s(M,n),s(M,h),s(M,r),M.putInt32(f.length()),M.putBuffer(f),M.putInt32(p.length()),M.putBuffer(p);var _=i.hmac.create();return _.start("sha1",w),_.update(M.bytes()),u+"\r\nPrivate-MAC: "+_.digest().toHex()+"\r\n"},n.publicKeyToOpenSSH=function(t,e){var r="ssh-rsa";e=e||"";var n=i.util.createBuffer();return s(n,r),a(n,t.e),a(n,t.n),r+" "+i.util.encode64(n.bytes())+" "+e},n.privateKeyToOpenSSH=function(t,e){return e?i.pki.encryptRsaPrivateKey(t,e,{legacy:!0,algorithm:"aes128"}):i.pki.privateKeyToPem(t)},n.getPublicKeyFingerprint=function(t,e){var r=(e=e||{}).md||i.md.md5.create(),n=i.util.createBuffer();s(n,"ssh-rsa"),a(n,t.e),a(n,t.n),r.start(),r.update(n.getBytes());var o=r.digest();if("hex"===e.encoding){var h=o.toHex();return e.delimiter?h.match(/.{2}/g).join(e.delimiter):h}if("binary"===e.encoding)return o.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".');return o}},172:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.sha256=i.sha256||{};i.md.sha256=i.md.algorithms.sha256=n,n.create=function(){s||(a=String.fromCharCode(128),a+=i.util.fillString(String.fromCharCode(0),64),o=[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],s=!0);var t=null,e=i.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var r=n.messageLengthSize/4,a=0;a<r;++a)n.fullMessageLength.push(0);return e=i.util.createBuffer(),t={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n}};return n.start(),n.update=function(a,s){"utf8"===s&&(a=i.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=o[1],o[1]=o[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,o[0]=o[1]/4294967296>>>0;return e.putBytes(a),h(t,r,e),(e.read>2048||0===e.length())&&e.compact(),n},n.digest=function(){var s=i.util.createBuffer();s.putBytes(e.bytes());var o,u=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize&n.blockLength-1;s.putBytes(a.substr(0,n.blockLength-u));for(var f=8*n.fullMessageLength[0],l=0;l<n.fullMessageLength.length-1;++l)f+=(o=8*n.fullMessageLength[l+1])/4294967296>>>0,s.putInt32(f>>>0),f=o>>>0;s.putInt32(f);var c={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};h(c,r,s);var d=i.util.createBuffer();return d.putInt32(c.h0),d.putInt32(c.h1),d.putInt32(c.h2),d.putInt32(c.h3),d.putInt32(c.h4),d.putInt32(c.h5),d.putInt32(c.h6),d.putInt32(c.h7),d},n};var a=null,s=!1,o=null;function h(t,e,r){for(var i,n,a,s,h,u,f,l,c,d,p,m,g,y=r.length();y>=64;){for(h=0;h<16;++h)e[h]=r.getInt32();for(;h<64;++h)i=((i=e[h-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,n=((n=e[h-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,e[h]=i+e[h-7]+n+e[h-16]|0;for(u=t.h0,f=t.h1,l=t.h2,c=t.h3,d=t.h4,p=t.h5,m=t.h6,g=t.h7,h=0;h<64;++h)a=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),s=u&f|l&(u^f),i=g+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(m^d&(p^m))+o[h]+e[h],g=m,m=p,p=d,d=c+i>>>0,c=l,l=f,f=u,u=i+(n=a+s)>>>0;t.h0=t.h0+u|0,t.h1=t.h1+f|0,t.h2=t.h2+l|0,t.h3=t.h3+c|0,t.h4=t.h4+d|0,t.h5=t.h5+p|0,t.h6=t.h6+m|0,t.h7=t.h7+g|0,y-=64}}},206:(t,e,r)=>{"use strict";var i=r(5606),n=r(3225);t.exports=b;var a,s=r(2240);b.ReadableState=v,r(7007).EventEmitter;var o=function(t,e){return t.listeners(e).length},h=r(5567),u=r(4116).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=Object.create(r(5622));l.inherits=r(6698);var c=r(2668),d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,m=r(672),g=r(6278);l.inherits(b,h);var y=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var i=e instanceof(a=a||r(6248));this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(6427).I),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(a=a||r(6248),!(this instanceof b))return new b(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),h.call(this)}function w(t,e,r,i,n){var a,s=t._readableState;return null===e?(s.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,E(t)}}(t,s)):(n||(a=function(t,e){var r,i;return i=e,u.isBuffer(i)||i instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):M(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?M(t,s,e,!1):A(t,s)):M(t,s,e,!1))):i||(s.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function M(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),A(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=u.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},b.prototype.unshift=function(t){return w(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return p||(p=r(6427).I),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var _=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=_?t=_:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(C,t):C(t))}function C(t){d("emit readable"),t.emit("readable"),k(t)}function A(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(T,t,e))}function T(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function B(t){d("readable nexttick read 0"),t.read(0)}function I(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),k(t),e.flowing&&!e.reading&&t.read(0)}function k(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,s=t>a.length?a.length:t;if(s===a.length?n+=a:n+=a.slice(0,t),0==(t-=s)){s===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(s));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=u.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,s=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,s),0==(t-=s)){s===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(s));break}++n}return e.length-=n,r}(t,e),i}(t,e.buffer,e.decoder),r);var r}function N(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function x(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}b.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):E(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&N(this),null;var i,n=e.needReadable;return d("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",n=!0),e.ended||e.reading?d("reading or ended",n=!1):n&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(r,e))),null===(i=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==i&&this.emit("data",i),i},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,e);var h=e&&!1===e.end||t===i.stdout||t===i.stderr?v:u;function u(){d("onend"),t.end()}a.endEmitted?n.nextTick(h):r.once("end",h),t.on("unpipe",(function e(i,n){d("onunpipe"),i===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",f),t.removeListener("error",m),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",p),l=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}));var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,k(t))}}(r);t.on("drain",f);var l=!1,c=!1;function p(e){d("ondata"),c=!1,!1!==t.write(e)||c||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==x(a.pipes,t))&&!l&&(d("false write response, pause",a.awaitDrain),a.awaitDrain++,c=!0),r.pause())}function m(e){d("onerror",e),v(),t.removeListener("error",m),0===o(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),v()}function y(){d("onfinish"),t.removeListener("close",g),v()}function v(){d("unpipe"),r.unpipe(t)}return r.on("data",p),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",m),t.once("close",g),t.once("finish",y),t.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=x(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},b.prototype.on=function(t,e){var r=h.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):n.nextTick(B,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(I,t,e))}(this,t)),this},b.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){d("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var a=0;a<y.length;a++)t.on(y[a],this.emit.bind(this,y[a]));return this._read=function(e){d("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=R},220:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011),a=n.assert,s=n.cachedProperty,o=n.parseBytes;function h(t,e){this.eddsa=t,"object"!=typeof e&&(e=o(e)),Array.isArray(e)&&(a(e.length===2*t.encodingLength,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),a(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof i&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(h,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(h,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(h,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(h,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),h.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},h.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},t.exports=h},251:(t,e)=>{e.read=function(t,e,r,i,n){var a,s,o=8*n-i-1,h=(1<<o)-1,u=h>>1,f=-7,l=r?n-1:0,c=r?-1:1,d=t[e+l];for(l+=c,a=d&(1<<-f)-1,d>>=-f,f+=o;f>0;a=256*a+t[e+l],l+=c,f-=8);for(s=a&(1<<-f)-1,a>>=-f,f+=i;f>0;s=256*s+t[e+l],l+=c,f-=8);if(0===a)a=1-u;else{if(a===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),a-=u}return(d?-1:1)*s*Math.pow(2,a-i)},e.write=function(t,e,r,i,n,a){var s,o,h,u=8*a-n-1,f=(1<<u)-1,l=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:a-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+l>=1?c/h:c*Math.pow(2,1-l))*h>=2&&(s++,h/=2),s+l>=f?(o=0,s=f):s+l>=1?(o=(e*h-1)*Math.pow(2,n),s+=l):(o=e*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;t[r+d]=255&o,d+=p,o/=256,n-=8);for(s=s<<n|o,u+=n;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*m}},268:(t,e,r)=>{var i=r(276);r(7619),r(3736),r(9356),function(){if(i.prime)t.exports=i.prime;else{var e=t.exports=i.prime=i.prime||{},r=i.jsbn.BigInteger,n=[6,4,2,4,2,4,6,2],a=new r(null);a.fromInt(30);var s=function(t,e){return t|e};e.generateProbablePrime=function(t,e,n){"function"==typeof e&&(n=e,e={});var a=(e=e||{}).algorithm||"PRIMEINC";"string"==typeof a&&(a={name:a}),a.options=a.options||{};var s=e.prng||i.random,h={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r<t.length;++r)t[r]=e.charCodeAt(r)}};if("PRIMEINC"===a.name)return function(t,e,n,a){return"workers"in n?function(t,e,n,a){if("undefined"==typeof Worker)return o(t,e,n,a);var s=u(t,e),h=n.workers,f=n.workLoad||100,l=30*f/8,c=n.workerScript||"forge/prime.worker.js";if(-1===h)return i.util.estimateCores((function(t,e){t&&(e=2),h=e-1,d()}));function d(){h=Math.max(1,h);for(var i=[],n=0;n<h;++n)i[n]=new Worker(c);for(n=0;n<h;++n)i[n].addEventListener("message",d);var o=!1;function d(n){if(!o){var h=n.data;if(h.found){for(var c=0;c<i.length;++c)i[c].terminate();return o=!0,a(null,new r(h.prime,16))}s.bitLength()>t&&(s=u(t,e));var d=s.toString(16);n.target.postMessage({hex:d,workLoad:f}),s.dAddOffset(l,0)}}}d()}(t,e,n,a):o(t,e,n,a)}(t,h,a.options,n);throw new Error("Invalid prime generation algorithm: "+a.name)}}function o(t,e,r,i){var n=u(t,e),a=function(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}(n.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),h(n,t,e,0,a,s,i)}function h(t,e,r,a,s,o,f){var l=+new Date;do{if(t.bitLength()>e&&(t=u(e,r)),t.isProbablePrime(s))return f(null,t);t.dAddOffset(n[a++%8],0)}while(o<0||+new Date-l<o);i.util.setImmediate((function(){h(t,e,r,a,s,o,f)}))}function u(t,e){var i=new r(t,e),n=t-1;return i.testBit(n)||i.bitwiseTo(r.ONE.shiftLeft(n),s,i),i.dAddOffset(31-i.mod(a).byteValue(),0),i}}()},276:t=>{t.exports={options:{usePureJavaScript:!1}}},295:(t,e,r)=>{var i=r(8287).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),n=new i(r),a=0;a<r;++a)n[a]=t[a]^e[a];return n}},310:()=>{},320:(t,e,r)=>{var i=r(8276);t.exports=function(t){return(new i).update(t).digest()}},345:(t,e,r)=>{t.exports=r(7007).EventEmitter},370:(t,e,r)=>{"use strict";var i=r(8490),n=r(6698),a=r(6677),s=r(7011);function o(t){a.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.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 h(t,e,r){a.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,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)))}n(o,a),t.exports=o,o.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},n(h,a.BasePoint),o.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},o.prototype.point=function(t,e){return new h(this,t,e)},o.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},h.fromJSON=function(t,e){return new h(t,e[0],e[1]||t.one)},h.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},h.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(r),s=n.redMul(i),o=e.z.redMul(a.redAdd(s).redSqr()),h=e.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,h)},h.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},392:(t,e,r)=>{var i=r(2861).Buffer;function n(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}n.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=i.from(t,e));for(var r=this._block,n=this._blockSize,a=t.length,s=this._len,o=0;o<a;){for(var h=s%n,u=Math.min(a-o,n-h),f=0;f<u;f++)r[h+f]=t[o+f];o+=u,(s+=u)%n==0&&this._update(r)}return this._len+=a,this},n.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=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 i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},462:(t,e,r)=>{var i=r(2861).Buffer;function n(t){i.isBuffer(t)||(t=i.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(4*n);return r}function a(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,i,n){for(var a,s,o,h,u=r[0],f=r[1],l=r[2],c=r[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],y=4,v=1;v<n;v++)a=u[d>>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&g]^e[y++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^c[255&d]^e[y++],o=u[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^c[255&p]^e[y++],h=u[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[y++],d=a,p=s,m=o,g=h;return a=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[y++],s=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[y++],o=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[y++],h=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[y++],[a>>>=0,s>>>=0,o>>>=0,h>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,h=0;h<256;++h){var u=o^o<<1^o<<2^o<<3^o<<4;u=u>>>8^255&u^99,r[s]=u,i[u]=s;var f=t[s],l=t[f],c=t[l],d=257*t[u]^16843008*u;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,a[0][u]=d<<24|d>>>8,a[1][u]=d<<16|d>>>16,a[2][u]=d<<8|d>>>24,a[3][u]=d,0===s?s=o=1:(s=f^t[t[t[c^f]]],o^=t[t[o]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}}();function u(t){this._key=n(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],a=0;a<e;a++)n[a]=t[a];for(a=e;a<i;a++){var s=n[a-1];a%e==0?(s=s<<8|s>>>24,s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s],s^=o[a/e|0]<<24):e>6&&a%e==4&&(s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s]),n[a]=n[a-e]^s}for(var u=[],f=0;f<i;f++){var l=i-f,c=n[l-(f%4?0:4)];u[f]=f<4||l<=4?c:h.INV_SUB_MIX[0][h.SBOX[c>>>24]]^h.INV_SUB_MIX[1][h.SBOX[c>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[c>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&c]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return s(t=n(t),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=i.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},u.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),a=i.allocUnsafe(16);return a.writeUInt32BE(r[0],0),a.writeUInt32BE(r[3],4),a.writeUInt32BE(r[2],8),a.writeUInt32BE(r[1],12),a},u.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=u},480:(t,e,r)=>{"use strict";var i,n=e,a=r(7952),s=r(894),o=r(7011).assert;function h(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new h(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=h,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r(4011)}catch(t){i=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},530:(t,e,r)=>{var i={ECB:r(2632),CBC:r(2884),CFB:r(6383),CFB8:r(6975),CFB1:r(5264),OFB:r(6843),CTR:r(3053),GCM:r(3053)},n=r(3219);for(var a in n)n[a].module=i[n[a].mode];t.exports=n},650:(t,e,r)=>{var i=r(462),n=r(2861).Buffer,a=r(6168);function s(t,e,r,s){a.call(this),this._cipher=new i.AES(e),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._mode=t}r(6698)(s,a),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},672:(t,e,r)=>{"use strict";var i=r(4116).Buffer,n=r(1638);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);for(var e,r,n=i.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=n,r=s,a.data.copy(e,r),s+=a.data.length,a=a.next;return n},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},735:(t,e,r)=>{var i=r(6698),n=r(82);function a(t){n.call(this,t),this.enc="pem"}i(a,n),t.exports=a,a.prototype.encode=function(t,e){for(var r=n.prototype.encode.call(this,t).toString("base64"),i=["-----BEGIN "+e.label+"-----"],a=0;a<r.length;a+=64)i.push(r.slice(a,a+64));return i.push("-----END "+e.label+"-----"),i.join("\n")}},894:(t,e,r)=>{"use strict";var i=e;i.base=r(6677),i.short=r(9188),i.mont=r(370),i.edwards=r(1298)},993:(t,e,r)=>{var i=r(9673).Reporter,n=r(9673).EncoderBuffer,a=r(9673).DecoderBuffer,s=r(3349),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function u(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};f.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},u.prototype._wrap=function(){var t=this._baseState;h.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},u.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var i=t[r];e[i]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),o.forEach((function(t){u.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),u.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},u.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var i,n=r.default,s=!0,o=null;if(null!==r.key&&(o=t.enterKey(r.key)),r.optional){var h=null;if(null!==r.explicit?h=r.explicit:null!==r.implicit?h=r.implicit:null!==r.tag&&(h=r.tag),null!==h||r.any){if(s=this._peekTag(t,h,r.any),t.isError(s))return s}else{var u=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(u)}}if(r.obj&&s&&(i=t.enterObject()),s){if(null!==r.explicit){var f=this._decodeTag(t,r.explicit);if(t.isError(f))return f;t=f}var l=t.offset;if(null===r.use&&null===r.choice){r.any&&(u=t.save());var c=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(c))return c;r.any?n=t.raw(u):t=c}if(e&&e.track&&null!==r.tag&&e.track(t.path(),l,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(n=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new a(n);n=this._getUse(r.contains,t._reporterState.obj)._decode(d,e)}}return r.obj&&s&&(n=t.leaveObject(i)),null===r.key||null===n&&!0!==s?null!==o&&t.exitKey(o):t.leaveKey(o,r.key,n),n},u.prototype._decodeGeneric=function(t,e,r){var i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,i.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&i.args?this._decodeObjid(e,i.args[0],i.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(t,e){var r=this._baseState,i=null,n=!1;return Object.keys(r.choice).some((function(a){var s=t.save(),o=r.choice[a];try{var h=o._decode(t,e);if(t.isError(h))return!1;i={type:a,value:h},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?i:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new n(t,this.reporter)},u.prototype._encode=function(t,e,r){var i=this._baseState;if(null===i.default||i.default!==t){var n=this._encodeValue(t,e,r);if(void 0!==n&&!this._skipDefault(n,e,r))return n}},u.prototype._encodeValue=function(t,e,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(t,e||new i);var a=null;if(this.reporter=e,n.optional&&void 0===t){if(null===n.default)return;t=n.default}var s=null,o=!1;if(n.any)a=this._createEncoderBuffer(t);else if(n.choice)a=this._encodeChoice(t,e);else if(n.contains)s=this._getUse(n.contains,r)._encode(t,e),o=!0;else if(n.children)s=n.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var i=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var n=r._encode(t[r._baseState.key],e,t);return e.leaveKey(i),n}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return e.error("Too many args for : "+n.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var h=this.clone();h._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){var i=this._baseState;return this._getUse(i.args[0],t)._encode(r,e)}),h))}else null!==n.use?a=this._getUse(n.use,r)._encode(t,e):(s=this._encodePrimitive(n.tag,t),o=!0);if(!n.any&&null===n.choice){var u=null!==n.implicit?n.implicit:n.tag,f=null===n.implicit?"universal":"context";null===u?null===n.use&&e.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(u,o,f,s))}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a},u.prototype._encodeChoice=function(t,e){var r=this._baseState,i=r.choice[t.type];return i||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},1069:()=>{},1137:(t,e,r)=>{"use strict";var i=r(7568);e.certificate=r(6413);var n=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=n;var a=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=a;var s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),o=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));e.PublicKey=o;var h=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=h;var u=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=u;var f=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=f,e.DSAparam=i.define("DSAparam",(function(){this.int()}));var l=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),c=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=c,e.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1158:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(4688).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,D=x>>>13,P=0|s[9],O=8191&P,K=P>>>13,j=0|o[0],q=8191&j,V=j>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(D,q)|0,a=Math.imul(D,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(K,q)|0,a=Math.imul(K,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(D,z)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(K,z)|0,a=Math.imul(K,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(K,Z)|0,a=Math.imul(K,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(K,Y)|0,a=Math.imul(K,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(K,$)|0,a=Math.imul(K,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(K,rt)|0,a=Math.imul(K,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(K,at)|0,a=Math.imul(K,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(D,ht)|0,a=a+Math.imul(D,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(K,ht)|0,a=Math.imul(K,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(K,lt)|0,a=Math.imul(K,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(K,pt)|0))<<13)|0;return u=((a=Math.imul(K,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},1200:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011).assert;function a(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=a,a.fromPublic=function(t,e,r){return e instanceof a?e:new a(t,{pub:e,pubEnc:r})},a.fromPrivate=function(t,e,r){return e instanceof a?e:new a(t,{priv:e,privEnc:r})},a.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new i(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?n(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},a.prototype.derive=function(t){return t.validate()||n(t.validate(),"public point not validated"),t.mul(this.priv).getX()},a.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},a.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},1241:(t,e,r)=>{var i=r(5799),n=r(6171),a=r(3219);e.createCipher=e.Cipher=i.createCipher,e.createCipheriv=e.Cipheriv=i.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(a)}},1267:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.md5=i.md5||{};i.md.md5=i.md.algorithms.md5=n,n.create=function(){u||function(){a=String.fromCharCode(128),a+=i.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],o=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],h=new Array(64);for(var t=0;t<64;++t)h[t]=Math.floor(4294967296*Math.abs(Math.sin(t+1)));u=!0}();var t=null,e=i.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var r=n.messageLengthSize/4,a=0;a<r;++a)n.fullMessageLength.push(0);return e=i.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n}};return n.start(),n.update=function(a,s){"utf8"===s&&(a=i.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var h=n.fullMessageLength.length-1;h>=0;--h)n.fullMessageLength[h]+=o[1],o[1]=o[0]+(n.fullMessageLength[h]/4294967296>>>0),n.fullMessageLength[h]=n.fullMessageLength[h]>>>0,o[0]=o[1]/4294967296>>>0;return e.putBytes(a),f(t,r,e),(e.read>2048||0===e.length())&&e.compact(),n},n.digest=function(){var s=i.util.createBuffer();s.putBytes(e.bytes());var o=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize&n.blockLength-1;s.putBytes(a.substr(0,n.blockLength-o));for(var h,u=0,l=n.fullMessageLength.length-1;l>=0;--l)u=(h=8*n.fullMessageLength[l]+u)/4294967296>>>0,s.putInt32Le(h>>>0);var c={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};f(c,r,s);var d=i.util.createBuffer();return d.putInt32Le(c.h0),d.putInt32Le(c.h1),d.putInt32Le(c.h2),d.putInt32Le(c.h3),d},n};var a=null,s=null,o=null,h=null,u=!1;function f(t,e,r){for(var i,n,a,u,f,l,c,d=r.length();d>=64;){for(n=t.h0,a=t.h1,u=t.h2,f=t.h3,c=0;c<16;++c)e[c]=r.getInt32Le(),i=n+(f^a&(u^f))+h[c]+e[c],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;for(;c<32;++c)i=n+(u^f&(a^u))+h[c]+e[s[c]],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;for(;c<48;++c)i=n+(a^u^f)+h[c]+e[s[c]],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;for(;c<64;++c)i=n+(u^(a|~f))+h[c]+e[s[c]],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;t.h0=t.h0+n|0,t.h1=t.h1+a|0,t.h2=t.h2+u|0,t.h3=t.h3+f|0,d-=64}}},1298:(t,e,r)=>{"use strict";var i=r(7011),n=r(8490),a=r(6698),s=r(6677),o=i.assert;function h(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new n(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function u(t,e,r,i,a){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===i?(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 n(e,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=a&&new n(a,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()))))}a(h,s),t.exports=h,h.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},h.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},h.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},h.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=i.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var h=o.fromRed().isOdd();return(e&&!h||!e&&h)&&(o=o.redNeg()),this.point(t,o)},h.prototype.pointFromY=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==e&&(o=o.redNeg()),this.point(o,t)},h.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===i.cmp(n)},a(u,s.BasePoint),h.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},h.prototype.point=function(t,e,r,i){return new u(this,t,e,r,i)},u.fromJSON=function(t,e){return new u(t,e[0],e[1],e[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=i.redAdd(e),s=a.redSub(r),o=i.redSub(e),h=n.redMul(s),u=a.redMul(o),f=n.redMul(o),l=s.redMul(a);return this.curve.point(h,u,l,f)},u.prototype._projDbl=function(){var t,e,r,i,n,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),h=this.y.redSqr();if(this.curve.twisted){var u=(i=this.curve._mulA(o)).redAdd(h);this.zOne?(t=s.redSub(o).redSub(h).redMul(u.redSub(this.curve.two)),e=u.redMul(i.redSub(h)),r=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),a=u.redSub(n).redISub(n),t=s.redSub(o).redISub(h).redMul(a),e=u.redMul(i.redSub(h)),r=u.redMul(a))}else i=o.redAdd(h),n=this.curve._mulC(this.z).redSqr(),a=i.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(i)).redMul(a),e=this.curve._mulC(i).redMul(o.redISub(h)),r=i.redMul(a);return this.curve.point(t,e,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),a=r.redSub(e),s=n.redSub(i),o=n.redAdd(i),h=r.redAdd(e),u=a.redMul(s),f=o.redMul(h),l=a.redMul(h),c=s.redMul(o);return this.curve.point(u,f,c,l)},u.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),a=this.x.redMul(t.x),s=this.y.redMul(t.y),o=this.curve.d.redMul(a).redMul(s),h=n.redSub(o),u=n.redAdd(o),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(s),l=i.redMul(h).redMul(f);return this.curve.twisted?(e=i.redMul(u).redMul(s.redSub(this.curve._mulA(a))),r=h.redMul(u)):(e=i.redMul(u).redMul(s.redSub(a)),r=this.curve._mulC(h).redMul(u)),this.curve.point(l,e,r)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},u.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},1324:(t,e,r)=>{var i=r(8287).Buffer,n=r(6729),a=r(2801);t.exports=function(t){return new o(t)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function h(t,e,r){Array.isArray(t)||(t=t.toArray());var n=new i(t);if(r&&n.length<r){var a=new i(r-n.length);a.fill(0),n=i.concat([a,n])}return e?n.toString(e):n}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,o.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},o.prototype.computeSecret=function(t,e,r){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),h(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},o.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),h(r,t)},o.prototype.getPrivateKey=function(t){return h(this.keys.getPrivate(),t)},o.prototype.setPublicKey=function(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this.keys._importPublic(t),this},o.prototype.setPrivateKey=function(t,e){e=e||"utf8",i.isBuffer(t)||(t=new i(t,e));var r=new a(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},1352:(t,e,r)=>{var i=r(320),n=r(6011),a=r(2802),s=r(2861).Buffer,o=r(4196),h=r(2455),u=r(3382),f=s.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(t,e,r){var o=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new n).update(t).digest()}:"md5"===t?i:function(e){return a(t).update(e).digest()}}(t),h="sha512"===t||"sha384"===t?128:64;e.length>h?e=o(e):e.length<h&&(e=s.concat([e,f],h));for(var u=s.allocUnsafe(h+l[t]),c=s.allocUnsafe(h+l[t]),d=0;d<h;d++)u[d]=54^e[d],c[d]=92^e[d];var p=s.allocUnsafe(h+r+4);u.copy(p,0,0,h),this.ipad1=p,this.ipad2=u,this.opad=c,this.alg=t,this.blocksize=h,this.hash=o,this.size=l[t]}c.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,i,n){o(r,i);var a=new c(n=n||"sha1",t=u(t,h,"Password"),(e=u(e,h,"Salt")).length),f=s.allocUnsafe(i),d=s.allocUnsafe(e.length+4);e.copy(d,0,0,e.length);for(var p=0,m=l[n],g=Math.ceil(i/m),y=1;y<=g;y++){d.writeUInt32BE(y,e.length);for(var v=a.run(d,a.ipad1),b=v,w=1;w<r;w++){b=a.run(b,a.ipad2);for(var M=0;M<m;M++)v[M]^=b[M]}v.copy(f,p),p+=m}return f}},1355:(t,e,r)=>{t.exports=r(8106),r(1267),r(1598),r(172),r(2313)},1373:(t,e,r)=>{var i=r(276);r(5250),t.exports=i.mgf=i.mgf||{},i.mgf.mgf1=i.mgf1},1417:(t,e,r)=>{var i=r(276);r(9356),r(7619),(t.exports=i.pss=i.pss||{}).create=function(t){3===arguments.length&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e,r=t.md,n=t.mgf,a=r.digestLength,s=t.salt||null;if("string"==typeof s&&(s=i.util.createBuffer(s)),"saltLength"in t)e=t.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");e=s.length()}if(null!==s&&s.length()!==e)throw new Error("Given salt length does not match length of given salt.");var o=t.prng||i.random;return{encode:function(t,h){var u,f,l=h-1,c=Math.ceil(l/8),d=t.digest().getBytes();if(c<a+e+2)throw new Error("Message is too long to encrypt.");f=null===s?o.getBytesSync(e):s.bytes();var p=new i.util.ByteBuffer;p.fillWithByte(0,8),p.putBytes(d),p.putBytes(f),r.start(),r.update(p.getBytes());var m=r.digest().getBytes(),g=new i.util.ByteBuffer;g.fillWithByte(0,c-e-a-2),g.putByte(1),g.putBytes(f);var y=g.getBytes(),v=c-a-1,b=n.generate(m,v),w="";for(u=0;u<v;u++)w+=String.fromCharCode(y.charCodeAt(u)^b.charCodeAt(u));var M=65280>>8*c-l&255;return(w=String.fromCharCode(w.charCodeAt(0)&~M)+w.substr(1))+m+String.fromCharCode(188)},verify:function(t,s,o){var h,u=o-1,f=Math.ceil(u/8);if(s=s.substr(-f),f<a+e+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==s.charCodeAt(f-1))throw new Error("Encoded message does not end in 0xBC.");var l=f-a-1,c=s.substr(0,l),d=s.substr(l,a),p=65280>>8*f-u&255;if(c.charCodeAt(0)&p)throw new Error("Bits beyond keysize not zero as expected.");var m=n.generate(d,l),g="";for(h=0;h<l;h++)g+=String.fromCharCode(c.charCodeAt(h)^m.charCodeAt(h));g=String.fromCharCode(g.charCodeAt(0)&~p)+g.substr(1);var y=f-a-e-2;for(h=0;h<y;h++)if(0!==g.charCodeAt(h))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(y))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var v=g.substr(-e),b=new i.util.ByteBuffer;return b.fillWithByte(0,8),b.putBytes(t),b.putBytes(v),r.start(),r.update(b.getBytes()),d===r.digest().getBytes()}}}},1565:(t,e,r)=>{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(3209),e.createHash=e.Hash=r(7108),e.createHmac=e.Hmac=r(3507);var i=r(5715),n=Object.keys(i),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);e.getHashes=function(){return a};var s=r(8396);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var o=r(125);e.Cipher=o.Cipher,e.createCipher=o.createCipher,e.Cipheriv=o.Cipheriv,e.createCipheriv=o.createCipheriv,e.Decipher=o.Decipher,e.createDecipher=o.createDecipher,e.Decipheriv=o.Decipheriv,e.createDecipheriv=o.createDecipheriv,e.getCiphers=o.getCiphers,e.listCiphers=o.listCiphers;var h=r(5380);e.DiffieHellmanGroup=h.DiffieHellmanGroup,e.createDiffieHellmanGroup=h.createDiffieHellmanGroup,e.getDiffieHellman=h.getDiffieHellman,e.createDiffieHellman=h.createDiffieHellman,e.DiffieHellman=h.DiffieHellman;var u=r(20);e.createSign=u.createSign,e.Sign=u.Sign,e.createVerify=u.createVerify,e.Verify=u.Verify,e.createECDH=r(1324);var f=r(7168);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var l=r(6983);e.randomFill=l.randomFill,e.randomFillSync=l.randomFillSync,e.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},e.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}},1598:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.sha1=i.sha1||{};i.md.sha1=i.md.algorithms.sha1=n,n.create=function(){s||(a=String.fromCharCode(128),a+=i.util.fillString(String.fromCharCode(0),64),s=!0);var t=null,e=i.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var r=n.messageLengthSize/4,a=0;a<r;++a)n.fullMessageLength.push(0);return e=i.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n}};return n.start(),n.update=function(a,s){"utf8"===s&&(a=i.util.encodeUtf8(a));var h=a.length;n.messageLength+=h,h=[h/4294967296>>>0,h>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=h[1],h[1]=h[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,h[0]=h[1]/4294967296>>>0;return e.putBytes(a),o(t,r,e),(e.read>2048||0===e.length())&&e.compact(),n},n.digest=function(){var s=i.util.createBuffer();s.putBytes(e.bytes());var h,u=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize&n.blockLength-1;s.putBytes(a.substr(0,n.blockLength-u));for(var f=8*n.fullMessageLength[0],l=0;l<n.fullMessageLength.length-1;++l)f+=(h=8*n.fullMessageLength[l+1])/4294967296>>>0,s.putInt32(f>>>0),f=h>>>0;s.putInt32(f);var c={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};o(c,r,s);var d=i.util.createBuffer();return d.putInt32(c.h0),d.putInt32(c.h1),d.putInt32(c.h2),d.putInt32(c.h3),d.putInt32(c.h4),d},n};var a=null,s=!1;function o(t,e,r){for(var i,n,a,s,o,h,u,f=r.length();f>=64;){for(n=t.h0,a=t.h1,s=t.h2,o=t.h3,h=t.h4,u=0;u<16;++u)i=r.getInt32(),e[u]=i,i=(n<<5|n>>>27)+(o^a&(s^o))+h+1518500249+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<20;++u)i=(i=e[u-3]^e[u-8]^e[u-14]^e[u-16])<<1|i>>>31,e[u]=i,i=(n<<5|n>>>27)+(o^a&(s^o))+h+1518500249+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<32;++u)i=(i=e[u-3]^e[u-8]^e[u-14]^e[u-16])<<1|i>>>31,e[u]=i,i=(n<<5|n>>>27)+(a^s^o)+h+1859775393+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<40;++u)i=(i=e[u-6]^e[u-16]^e[u-28]^e[u-32])<<2|i>>>30,e[u]=i,i=(n<<5|n>>>27)+(a^s^o)+h+1859775393+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<60;++u)i=(i=e[u-6]^e[u-16]^e[u-28]^e[u-32])<<2|i>>>30,e[u]=i,i=(n<<5|n>>>27)+(a&s|o&(a^s))+h+2400959708+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<80;++u)i=(i=e[u-6]^e[u-16]^e[u-28]^e[u-32])<<2|i>>>30,e[u]=i,i=(n<<5|n>>>27)+(a^s^o)+h+3395469782+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;t.h0=t.h0+n|0,t.h1=t.h1+a|0,t.h2=t.h2+s|0,t.h3=t.h3+o|0,t.h4=t.h4+h|0,f-=64}}},1636:t=>{"use strict";t.exports={rE:"6.6.1"}},1638:()=>{},1696:(t,e,r)=>{var i=r(276);r(8106),r(7619),(t.exports=i.hmac=i.hmac||{}).create=function(){var t=null,e=null,r=null,n=null,a={start:function(a,s){if(null!==a)if("string"==typeof a){if(!((a=a.toLowerCase())in i.md.algorithms))throw new Error('Unknown hash algorithm "'+a+'"');e=i.md.algorithms[a].create()}else e=a;if(null===s)s=t;else{if("string"==typeof s)s=i.util.createBuffer(s);else if(i.util.isArray(s)){var o=s;s=i.util.createBuffer();for(var h=0;h<o.length;++h)s.putByte(o[h])}var u=s.length();for(u>e.blockLength&&(e.start(),e.update(s.bytes()),s=e.digest()),r=i.util.createBuffer(),n=i.util.createBuffer(),u=s.length(),h=0;h<u;++h)o=s.at(h),r.putByte(54^o),n.putByte(92^o);if(u<e.blockLength)for(o=e.blockLength-u,h=0;h<o;++h)r.putByte(54),n.putByte(92);t=s,r=r.bytes(),n=n.bytes()}e.start(),e.update(r)},update:function(t){e.update(t)},getMac:function(){var t=e.digest().bytes();return e.start(),e.update(n),e.update(t),e.digest()}};return a.digest=a.getMac,a}},1800:(t,e,r)=>{"use strict";var i=r(6698),n=r(2861).Buffer,a=r(6168),s=n.alloc(128),o=64;function h(t,e){a.call(this,"digest"),"string"==typeof e&&(e=n.from(e)),this._alg=t,this._key=e,e.length>o?e=t(e):e.length<o&&(e=n.concat([e,s],o));for(var r=this._ipad=n.allocUnsafe(o),i=this._opad=n.allocUnsafe(o),h=0;h<o;h++)r[h]=54^e[h],i[h]=92^e[h];this._hash=[r]}i(h,a),h.prototype._update=function(t){this._hash.push(t)},h.prototype._final=function(){var t=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,t]))},t.exports=h},1816:(t,e,r)=>{"use strict";t.exports=s;var i=r(6248),n=Object.create(r(5622));function a(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);i.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",o)}function o(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){h(t,e,r)})):h(this,null,null)}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}n.inherits=r(6698),n.inherits(s,i),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,i.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;i.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},1911:(t,e,r)=>{"use strict";var i=r(7426),n=r(7766);function a(){if(!(this instanceof a))return new a;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(a,n),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},2010:(t,e,r)=>{var i=r(6698),n=r(7568),a=n.base,s=n.bignum,o=n.constants.der;function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){a.Node.call(this,"der",t)}function f(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=o.tagClass[r>>6],n=!(32&r);if(31&~r)r&=31;else{var a=r;for(r=0;!(128&~a);){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=127&a}}return{cls:i,primitive:n,tag:r,tagStr:o.tag[r]}}function l(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(!(128&i))return i;var n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var s=t.readUInt8(r);if(t.isError(s))return s;i|=s}return i}t.exports=h,h.prototype.decode=function(t,e){return t instanceof a.DecoderBuffer||(t=new a.DecoderBuffer(t,e)),this.tree._decode(t,e)},i(u,a.Node),u.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var i=t.save(),n=f(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(i),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||r)},u.prototype._decodeTag=function(t,e,r){var i=f(t,'Failed to decode tag of "'+e+'"');if(t.isError(i))return i;var n=l(t,i.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!r&&i.tag!==e&&i.tagStr!==e&&i.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(i.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');var a=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(n=t.offset-a.offset,t.restore(a),t.skip(n,'Failed to match body of: "'+e+'"'))},u.prototype._skipUntilEnd=function(t,e){for(;;){var r=f(t,e);if(t.isError(r))return r;var i,n=l(t,r.primitive,e);if(t.isError(n))return n;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===r.tagStr)break}},u.prototype._decodeList=function(t,e,r,i){for(var n=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var s=r.decode(t,"der",i);if(t.isError(s)&&a)break;n.push(s)}return n},u.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var i=t.raw();if(i.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var n="",a=0;a<i.length/2;a++)n+=String.fromCharCode(i.readUInt16BE(2*a));return n}if("numstr"===e){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var o=t.raw().toString("ascii");return this._isPrintstr(o)?o:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},u.prototype._decodeObjid=function(t,e,r){for(var i,n=[],a=0;!t.isEmpty();){var s=t.readUInt8();a<<=7,a|=127&s,128&s||(n.push(a),a=0)}128&s&&n.push(a);var o=n[0]/40|0,h=n[0]%40;if(i=r?n:[o,h].concat(n.slice(1)),e){var u=e[i.join(" ")];void 0===u&&(u=e[i.join(".")]),void 0!==u&&(i=u)}return i},u.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var i=0|r.slice(0,4),n=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),o=0|r.slice(10,12),h=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");i=0|r.slice(0,2),n=0|r.slice(2,4),a=0|r.slice(4,6),s=0|r.slice(6,8),o=0|r.slice(8,10),h=0|r.slice(10,12),i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,a,s,o,h,0)},u.prototype._decodeNull=function(t){return null},u.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},u.prototype._decodeInt=function(t,e){var r=t.raw(),i=new s(r);return e&&(i=e[i.toString(10)]||i),i},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},2045:(t,e,r)=>{var i=r(276);r(7619),t.exports=i.log=i.log||{},i.log.levels=["none","error","warning","info","debug","verbose","max"];var n={},a=[],s=null;i.log.LEVEL_LOCKED=2,i.log.NO_LEVEL_CHECK=4,i.log.INTERPOLATE=8;for(var o=0;o<i.log.levels.length;++o){var h=i.log.levels[o];n[h]={index:o,name:h.toUpperCase()}}i.log.logMessage=function(t){for(var e=n[t.level].index,r=0;r<a.length;++r){var s=a[r];s.flags&i.log.NO_LEVEL_CHECK?s.f(t):e<=n[s.level].index&&s.f(s,t)}},i.log.prepareStandard=function(t){"standard"in t||(t.standard=n[t.level].name+" ["+t.category+"] "+t.message)},i.log.prepareFull=function(t){if(!("full"in t)){var e=[t.message];e=e.concat([]||0),t.full=i.util.format.apply(this,e)}},i.log.prepareStandardFull=function(t){"standardFull"in t||(i.log.prepareStandard(t),t.standardFull=t.standard)};var u=["error","warning","info","debug","verbose"];for(o=0;o<u.length;++o)!function(t){i.log[t]=function(e,r){var n=Array.prototype.slice.call(arguments).slice(2),a={timestamp:new Date,level:t,category:e,message:r,arguments:n};i.log.logMessage(a)}}(u[o]);if(i.log.makeLogger=function(t){var e={flags:0,f:t};return i.log.setLevel(e,"none"),e},i.log.setLevel=function(t,e){var r=!1;if(t&&!(t.flags&i.log.LEVEL_LOCKED))for(var n=0;n<i.log.levels.length;++n)if(e==i.log.levels[n]){t.level=e,r=!0;break}return r},i.log.lock=function(t,e){void 0===e||e?t.flags|=i.log.LEVEL_LOCKED:t.flags&=~i.log.LEVEL_LOCKED},i.log.addLogger=function(t){a.push(t)},"undefined"!=typeof console&&"log"in console){var f;if(console.error&&console.warn&&console.info&&console.debug){var l={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},c=function(t,e){i.log.prepareStandard(e);var r=l[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),r.apply(console,n)};f=i.log.makeLogger(c)}else c=function(t,e){i.log.prepareStandardFull(e),console.log(e.standardFull)},f=i.log.makeLogger(c);i.log.setLevel(f,"debug"),i.log.addLogger(f),s=f}else console={log:function(){}};if(null!==s&&"undefined"!=typeof window&&window.location){var d=new URL(window.location.href).searchParams;d.has("console.level")&&i.log.setLevel(s,d.get("console.level").slice(-1)[0]),d.has("console.lock")&&"true"==d.get("console.lock").slice(-1)[0]&&i.log.lock(s)}i.log.consoleLogger=s},2061:t=>{t.exports=function(t,e){for(var r=t.length,i=-1;++i<r;)t[i]^=e[i];return t}},2153:(t,e,r)=>{var i=e;i._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var i=t[r];e[i]=r})),e},i.der=r(4598)},2211:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698),a=r(7626),s=r(2808);function o(){this.tmp=new Array(2),this.keys=null}function h(t){s.call(this,t);var e=new o;this._desState=e,this.deriveKeys(e,t.key)}n(h,s),t.exports=h,h.create=function(t){return new h(t)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];h.prototype.deriveKeys=function(t,e){t.keys=new Array(32),i.equal(e.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(e,0),n=a.readUInt32BE(e,4);a.pc1(r,n,t.tmp,0),r=t.tmp[0],n=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var o=u[s>>>1];r=a.r28shl(r,o),n=a.r28shl(n,o),a.pc2(r,n,t.keys,s)}},h.prototype._update=function(t,e,r,i){var n=this._desState,s=a.readUInt32BE(t,e),o=a.readUInt32BE(t,e+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(r,s,i),a.writeUInt32BE(r,o,i+4)},h.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,i=e;i<t.length;i++)t[i]=r;return!0},h.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)i.equal(t[r],e);return t.slice(0,t.length-e)},h.prototype._encrypt=function(t,e,r,i,n){for(var s=e,o=r,h=0;h<t.keys.length;h+=2){var u=t.keys[h],f=t.keys[h+1];a.expand(o,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=a.substitute(u,f),c=o;o=(s^a.permute(l))>>>0,s=c}a.rip(o,s,i,n)},h.prototype._decrypt=function(t,e,r,i,n){for(var s=r,o=e,h=t.keys.length-2;h>=0;h-=2){var u=t.keys[h],f=t.keys[h+1];a.expand(s,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=a.substitute(u,f),c=s;s=(o^a.permute(l))>>>0,o=c}a.rip(s,o,i,n)}},2240:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},2244:(t,e,r)=>{var i=r(1158),n=r(5037);function a(t){this.rand=t||new n.Rand}t.exports=a,a.create=function(t){return new a(t)},a.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var n=new i(this.rand.generate(r))}while(n.cmp(t)>=0);return n},a.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},a.prototype.test=function(t,e,r){var n=t.bitLength(),a=i.mont(t),s=new i(1).toRed(a);e||(e=Math.max(1,n/48|0));for(var o=t.subn(1),h=0;!o.testn(h);h++);for(var u=t.shrn(h),f=o.toRed(a);e>0;e--){var l=this._randrange(new i(2),o);r&&r(l);var c=l.toRed(a).redPow(u);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var d=1;d<h;d++){if(0===(c=c.redSqr()).cmp(s))return!1;if(0===c.cmp(f))break}if(d===h)return!1}}return!0},a.prototype.getDivisor=function(t,e){var r=t.bitLength(),n=i.mont(t),a=new i(1).toRed(n);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),o=0;!s.testn(o);o++);for(var h=t.shrn(o),u=s.toRed(n);e>0;e--){var f=this._randrange(new i(2),s),l=t.gcd(f);if(0!==l.cmpn(1))return l;var c=f.toRed(n).redPow(h);if(0!==c.cmp(a)&&0!==c.cmp(u)){for(var d=1;d<o;d++){if(0===(c=c.redSqr()).cmp(a))return c.fromRed().subn(1).gcd(t);if(0===c.cmp(u))break}if(d===o)return(c=c.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},2287:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=r(6225),s=r(3349),o=i.sum32,h=i.sum32_4,u=i.sum32_5,f=a.ch32,l=a.maj32,c=a.s0_256,d=a.s1_256,p=a.g0_256,m=a.g1_256,g=n.BlockHash,y=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}i.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=h(m(r[i-2]),r[i-7],p(r[i-15]),r[i-16]);var n=this.h[0],a=this.h[1],g=this.h[2],y=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],M=this.h[7];for(s(this.k.length===r.length),i=0;i<r.length;i++){var _=u(M,d(v),f(v,b,w),this.k[i],r[i]),S=o(c(n),l(n,a,g));M=w,w=b,b=v,v=o(y,_),y=g,g=a,a=n,n=o(_,S)}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],g),this.h[3]=o(this.h[3],y),this.h[4]=o(this.h[4],v),this.h[5]=o(this.h[5],b),this.h[6]=o(this.h[6],w),this.h[7]=o(this.h[7],M)},v.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},2313:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.sha512=i.sha512||{};i.md.sha512=i.md.algorithms.sha512=n;var a=i.sha384=i.sha512.sha384=i.sha512.sha384||{};a.create=function(){return n.create("SHA-384")},i.md.sha384=i.md.algorithms.sha384=a,i.sha512.sha256=i.sha512.sha256||{create:function(){return n.create("SHA-512/256")}},i.md["sha512/256"]=i.md.algorithms["sha512/256"]=i.sha512.sha256,i.sha512.sha224=i.sha512.sha224||{create:function(){return n.create("SHA-512/224")}},i.md["sha512/224"]=i.md.algorithms["sha512/224"]=i.sha512.sha224,n.create=function(t){if(o||(s=String.fromCharCode(128),s+=i.util.fillString(String.fromCharCode(0),128),h=[[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]],(u={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],u["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],u["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],u["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],o=!0),void 0===t&&(t="SHA-512"),!(t in u))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=u[t],r=null,n=i.util.createBuffer(),a=new Array(80),l=0;l<80;++l)a[l]=new Array(2);var c=64;switch(t){case"SHA-384":c=48;break;case"SHA-512/256":c=32;break;case"SHA-512/224":c=28}var d={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:c,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){d.messageLength=0,d.fullMessageLength=d.messageLength128=[];for(var t=d.messageLengthSize/4,a=0;a<t;++a)d.fullMessageLength.push(0);for(n=i.util.createBuffer(),r=new Array(e.length),a=0;a<e.length;++a)r[a]=e[a].slice(0);return d}};return d.start(),d.update=function(t,e){"utf8"===e&&(t=i.util.encodeUtf8(t));var s=t.length;d.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=d.fullMessageLength.length-1;o>=0;--o)d.fullMessageLength[o]+=s[1],s[1]=s[0]+(d.fullMessageLength[o]/4294967296>>>0),d.fullMessageLength[o]=d.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return n.putBytes(t),f(r,a,n),(n.read>2048||0===n.length())&&n.compact(),d},d.digest=function(){var e=i.util.createBuffer();e.putBytes(n.bytes());var o,h=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1;e.putBytes(s.substr(0,d.blockLength-h));for(var u=8*d.fullMessageLength[0],l=0;l<d.fullMessageLength.length-1;++l)u+=(o=8*d.fullMessageLength[l+1])/4294967296>>>0,e.putInt32(u>>>0),u=o>>>0;e.putInt32(u);var c=new Array(r.length);for(l=0;l<r.length;++l)c[l]=r[l].slice(0);f(c,a,e);var p,m=i.util.createBuffer();for(p="SHA-512"===t?c.length:"SHA-384"===t?c.length-2:c.length-4,l=0;l<p;++l)m.putInt32(c[l][0]),l===p-1&&"SHA-512/224"===t||m.putInt32(c[l][1]);return m},d};var s=null,o=!1,h=null,u=null;function f(t,e,r){for(var i,n,a,s,o,u,f,l,c,d,p,m,g,y,v,b,w,M,_,S,E,C,A,T,B,I,k,R,N,L,x,U,D,P=r.length();P>=128;){for(k=0;k<16;++k)e[k][0]=r.getInt32()>>>0,e[k][1]=r.getInt32()>>>0;for(;k<80;++k)i=(((R=(L=e[k-2])[0])>>>19|(N=L[1])<<13)^(N>>>29|R<<3)^R>>>6)>>>0,n=((R<<13|N>>>19)^(N<<3|R>>>29)^(R<<26|N>>>6))>>>0,a=(((R=(U=e[k-15])[0])>>>1|(N=U[1])<<31)^(R>>>8|N<<24)^R>>>7)>>>0,s=((R<<31|N>>>1)^(R<<24|N>>>8)^(R<<25|N>>>7))>>>0,x=e[k-7],D=e[k-16],N=n+x[1]+s+D[1],e[k][0]=i+x[0]+a+D[0]+(N/4294967296>>>0)>>>0,e[k][1]=N>>>0;for(p=t[0][0],m=t[0][1],g=t[1][0],y=t[1][1],v=t[2][0],b=t[2][1],w=t[3][0],M=t[3][1],_=t[4][0],S=t[4][1],E=t[5][0],C=t[5][1],A=t[6][0],T=t[6][1],B=t[7][0],I=t[7][1],k=0;k<80;++k)f=((_>>>14|S<<18)^(_>>>18|S<<14)^(S>>>9|_<<23))>>>0,l=(A^_&(E^A))>>>0,o=((p>>>28|m<<4)^(m>>>2|p<<30)^(m>>>7|p<<25))>>>0,u=((p<<4|m>>>28)^(m<<30|p>>>2)^(m<<25|p>>>7))>>>0,c=(p&g|v&(p^g))>>>0,d=(m&y|b&(m^y))>>>0,N=I+(((_<<18|S>>>14)^(_<<14|S>>>18)^(S<<23|_>>>9))>>>0)+((T^S&(C^T))>>>0)+h[k][1]+e[k][1],i=B+f+l+h[k][0]+e[k][0]+(N/4294967296>>>0)>>>0,n=N>>>0,a=o+c+((N=u+d)/4294967296>>>0)>>>0,s=N>>>0,B=A,I=T,A=E,T=C,E=_,C=S,_=w+i+((N=M+n)/4294967296>>>0)>>>0,S=N>>>0,w=v,M=b,v=g,b=y,g=p,y=m,p=i+a+((N=n+s)/4294967296>>>0)>>>0,m=N>>>0;N=t[0][1]+m,t[0][0]=t[0][0]+p+(N/4294967296>>>0)>>>0,t[0][1]=N>>>0,N=t[1][1]+y,t[1][0]=t[1][0]+g+(N/4294967296>>>0)>>>0,t[1][1]=N>>>0,N=t[2][1]+b,t[2][0]=t[2][0]+v+(N/4294967296>>>0)>>>0,t[2][1]=N>>>0,N=t[3][1]+M,t[3][0]=t[3][0]+w+(N/4294967296>>>0)>>>0,t[3][1]=N>>>0,N=t[4][1]+S,t[4][0]=t[4][0]+_+(N/4294967296>>>0)>>>0,t[4][1]=N>>>0,N=t[5][1]+C,t[5][0]=t[5][0]+E+(N/4294967296>>>0)>>>0,t[5][1]=N>>>0,N=t[6][1]+T,t[6][0]=t[6][0]+A+(N/4294967296>>>0)>>>0,t[6][1]=N>>>0,N=t[7][1]+I,t[7][0]=t[7][0]+B+(N/4294967296>>>0)>>>0,t[7][1]=N>>>0,P-=128}}},2344:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8982).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,D=x>>>13,P=0|s[9],O=8191&P,K=P>>>13,j=0|o[0],q=8191&j,V=j>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(D,q)|0,a=Math.imul(D,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(K,q)|0,a=Math.imul(K,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(D,z)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(K,z)|0,a=Math.imul(K,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(K,Z)|0,a=Math.imul(K,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(K,Y)|0,a=Math.imul(K,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(K,$)|0,a=Math.imul(K,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(K,rt)|0,a=Math.imul(K,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(K,at)|0,a=Math.imul(K,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(D,ht)|0,a=a+Math.imul(D,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(K,ht)|0,a=Math.imul(K,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(K,lt)|0,a=Math.imul(K,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(K,pt)|0))<<13)|0;return u=((a=Math.imul(K,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2356:(t,e,r)=>{var i=r(462),n=r(2861).Buffer,a=r(6168),s=r(6698),o=r(5892),h=r(295),u=r(5122);function f(t,e,r,s){a.call(this);var h=n.alloc(4,0);this._cipher=new i.AES(e);var f=this._cipher.encryptBlock(h);this._ghash=new o(f),r=function(t,e,r){if(12===e.length)return t._finID=n.concat([e,n.from([0,0,0,1])]),n.concat([e,n.from([0,0,0,2])]);var i=new o(r),a=e.length,s=a%16;i.update(e),s&&(s=16-s,i.update(n.alloc(s,0))),i.update(n.alloc(8,0));var h=8*a,f=n.alloc(8);f.writeUIntBE(h,0,8),i.update(f),t._finID=i.state;var l=n.from(t._finID);return u(l),l}(this,r,f),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(f,a),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=n.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=h(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},f.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=f},2385:(t,e,r)=>{var i=r(276);r(7619);var n=t.exports=i.pem=i.pem||{};function a(t){for(var e=t.name+": ",r=[],i=function(t,e){return" "+e},n=0;n<t.values.length;++n)r.push(t.values[n].replace(/^(\S+\r\n)/,i));e+=r.join(",")+"\r\n";var a=0,s=-1;for(n=0;n<e.length;++n,++a)if(a>65&&-1!==s){var o=e[s];","===o?(++s,e=e.substr(0,s)+"\r\n "+e.substr(s)):e=e.substr(0,s)+"\r\n"+o+e.substr(s+1),a=n-s-1,s=-1,++n}else" "!==e[n]&&"\t"!==e[n]&&","!==e[n]||(s=n);return e}function s(t){return t.replace(/^\s+/,"")}n.encode=function(t,e){e=e||{};var r,n="-----BEGIN "+t.type+"-----\r\n";if(t.procType&&(n+=a(r={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]})),t.contentDomain&&(n+=a(r={name:"Content-Domain",values:[t.contentDomain]})),t.dekInfo&&(r={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&r.values.push(t.dekInfo.parameters),n+=a(r)),t.headers)for(var s=0;s<t.headers.length;++s)n+=a(t.headers[s]);return t.procType&&(n+="\r\n"),(n+=i.util.encode64(t.body,e.maxline||64)+"\r\n")+"-----END "+t.type+"-----\r\n"},n.decode=function(t){for(var e,r=[],n=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,o=/\r?\n/;e=n.exec(t);){var h=e[1];"NEW CERTIFICATE REQUEST"===h&&(h="CERTIFICATE REQUEST");var u={type:h,procType:null,contentDomain:null,dekInfo:null,headers:[],body:i.util.decode64(e[3])};if(r.push(u),e[2]){for(var f=e[2].split(o),l=0;e&&l<f.length;){for(var c=f[l].replace(/\s+$/,""),d=l+1;d<f.length;++d){var p=f[d];if(!/\s/.test(p[0]))break;c+=p,l=d}if(e=c.match(a)){for(var m={name:e[1],values:[]},g=e[2].split(","),y=0;y<g.length;++y)m.values.push(s(g[y]));if(u.procType)if(u.contentDomain||"Content-Domain"!==m.name)if(u.dekInfo||"DEK-Info"!==m.name)u.headers.push(m);else{if(0===m.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:g[0],parameters:g[1]||null}}else u.contentDomain=g[0]||"";else{if("Proc-Type"!==m.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==m.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:g[0],type:g[1]}}}++l}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},2438:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},2455:(t,e,r)=>{var i,n=r(5606);i=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=i},2509:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(1069).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,D=x>>>13,P=0|s[9],O=8191&P,K=P>>>13,j=0|o[0],q=8191&j,V=j>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(D,q)|0,a=Math.imul(D,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(K,q)|0,a=Math.imul(K,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(D,z)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(K,z)|0,a=Math.imul(K,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(K,Z)|0,a=Math.imul(K,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(K,Y)|0,a=Math.imul(K,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(K,$)|0,a=Math.imul(K,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(K,rt)|0,a=Math.imul(K,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(K,at)|0,a=Math.imul(K,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(D,ht)|0,a=a+Math.imul(D,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(K,ht)|0,a=Math.imul(K,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(K,lt)|0,a=Math.imul(K,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(K,pt)|0))<<13)|0;return u=((a=Math.imul(K,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2632:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},2668:()=>{},2698:(t,e,r)=>{var i=r(276);if(r(9504),r(2746),r(9095),r(8106),r(6418),r(3254),r(2385),r(9356),r(5124),r(5805),r(7619),void 0===n)var n=i.jsbn.BigInteger;var a=i.asn1,s=i.pki=i.pki||{};t.exports=s.pbe=i.pbe=i.pbe||{};var o=s.oids,h={name:"EncryptedPrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},u={name:"PBES2Algorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},f={name:"pkcs-12PbeParams",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"iterations"}]};function l(t,e){return t.start().update(e).digest().getBytes()}function c(t){var e;if(t){if(!(e=s.oids[a.derToOid(t)])){var r=new Error("Unsupported PRF OID.");throw r.oid=t,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else e="hmacWithSHA1";return d(e)}function d(t){var e=i.md;switch(t){case"hmacWithSHA224":e=i.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":t=t.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=t,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!e||!(t in e))throw new Error("Unknown hash algorithm: "+t);return e[t].create()}s.encryptPrivateKeyInfo=function(t,e,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n,h,u,f=i.random.getBytesSync(r.saltSize),l=r.count,c=a.integerToDer(l);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var p,m,g;switch(r.algorithm){case"aes128":n=16,p=16,m=o["aes128-CBC"],g=i.aes.createEncryptionCipher;break;case"aes192":n=24,p=16,m=o["aes192-CBC"],g=i.aes.createEncryptionCipher;break;case"aes256":n=32,p=16,m=o["aes256-CBC"],g=i.aes.createEncryptionCipher;break;case"des":n=8,p=8,m=o.desCBC,g=i.des.createEncryptionCipher;break;default:throw(_=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,_}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),v=d(y),b=i.pkcs5.pbkdf2(e,f,l,n,v),w=i.random.getBytesSync(p);(S=g(b)).start(w),S.update(a.toDer(t)),S.finish(),u=S.output.getBytes();var M=function(t,e,r,n){var o=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,t),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,e.getBytes())]);return"hmacWithSHA1"!==n&&o.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,i.util.hexToBytes(r.toString(16))),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.oids[n]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])),o}(f,c,n,y);h=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.pkcs5PBES2).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.pkcs5PBKDF2).getBytes()),M]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(m).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,w)])])])}else{var _;if("3des"!==r.algorithm)throw(_=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,_;n=24;var S,E=new i.util.ByteBuffer(f);b=s.pbe.generatePkcs12Key(e,E,1,l,n),w=s.pbe.generatePkcs12Key(e,E,2,l,n),(S=i.des.createEncryptionCipher(b)).start(w),S.update(a.toDer(t)),S.finish(),u=S.output.getBytes(),h=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,f),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,c.getBytes())])])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[h,a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,u)])},s.decryptPrivateKeyInfo=function(t,e){var r=null,n={},o=[];if(!a.validate(t,h,n,o)){var u=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw u.errors=o,u}var f=a.derToOid(n.encryptionOid),l=s.pbe.getCipher(f,n.encryptionParams,e),c=i.util.createBuffer(n.encryptedData);return l.update(c),l.finish()&&(r=a.fromDer(l.output)),r},s.encryptedPrivateKeyToPem=function(t,e){var r={type:"ENCRYPTED PRIVATE KEY",body:a.toDer(t).getBytes()};return i.pem.encode(r,{maxline:e})},s.encryptedPrivateKeyFromPem=function(t){var e=i.pem.decode(t)[0];if("ENCRYPTED PRIVATE KEY"!==e.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return a.fromDer(e.body)},s.encryptRsaPrivateKey=function(t,e,r){if(!(r=r||{}).legacy){var n=s.wrapRsaPrivateKey(s.privateKeyToAsn1(t));return n=s.encryptPrivateKeyInfo(n,e,r),s.encryptedPrivateKeyToPem(n)}var o,h,u,f;switch(r.algorithm){case"aes128":o="AES-128-CBC",u=16,h=i.random.getBytesSync(16),f=i.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",u=24,h=i.random.getBytesSync(16),f=i.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",u=32,h=i.random.getBytesSync(16),f=i.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",u=24,h=i.random.getBytesSync(8),f=i.des.createEncryptionCipher;break;case"des":o="DES-CBC",u=8,h=i.random.getBytesSync(8),f=i.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw l.algorithm=r.algorithm,l}var c=f(i.pbe.opensslDeriveBytes(e,h.substr(0,8),u));c.start(h),c.update(a.toDer(s.privateKeyToAsn1(t))),c.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:i.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return i.pem.encode(d)},s.decryptRsaPrivateKey=function(t,e){var r=null,n=i.pem.decode(t)[0];if("ENCRYPTED PRIVATE KEY"!==n.type&&"PRIVATE KEY"!==n.type&&"RSA PRIVATE KEY"!==n.type)throw(u=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=u,u;if(n.procType&&"ENCRYPTED"===n.procType.type){var o,h;switch(n.dekInfo.algorithm){case"DES-CBC":o=8,h=i.des.createDecryptionCipher;break;case"DES-EDE3-CBC":o=24,h=i.des.createDecryptionCipher;break;case"AES-128-CBC":o=16,h=i.aes.createDecryptionCipher;break;case"AES-192-CBC":o=24,h=i.aes.createDecryptionCipher;break;case"AES-256-CBC":o=32,h=i.aes.createDecryptionCipher;break;case"RC2-40-CBC":o=5,h=function(t){return i.rc2.createDecryptionCipher(t,40)};break;case"RC2-64-CBC":o=8,h=function(t){return i.rc2.createDecryptionCipher(t,64)};break;case"RC2-128-CBC":o=16,h=function(t){return i.rc2.createDecryptionCipher(t,128)};break;default:var u;throw(u=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".')).algorithm=n.dekInfo.algorithm,u}var f=i.util.hexToBytes(n.dekInfo.parameters),l=h(i.pbe.opensslDeriveBytes(e,f.substr(0,8),o));if(l.start(f),l.update(i.util.createBuffer(n.body)),!l.finish())return r;r=l.output.getBytes()}else r=n.body;return null!==(r="ENCRYPTED PRIVATE KEY"===n.type?s.decryptPrivateKeyInfo(a.fromDer(r),e):a.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(t,e,r,n,a,s){var o,h;if(null==s){if(!("sha1"in i.md))throw new Error('"sha1" hash algorithm unavailable.');s=i.md.sha1.create()}var u=s.digestLength,f=s.blockLength,l=new i.util.ByteBuffer,c=new i.util.ByteBuffer;if(null!=t){for(h=0;h<t.length;h++)c.putInt16(t.charCodeAt(h));c.putInt16(0)}var d=c.length(),p=e.length(),m=new i.util.ByteBuffer;m.fillWithByte(r,f);var g=f*Math.ceil(p/f),y=new i.util.ByteBuffer;for(h=0;h<g;h++)y.putByte(e.at(h%p));var v=f*Math.ceil(d/f),b=new i.util.ByteBuffer;for(h=0;h<v;h++)b.putByte(c.at(h%d));var w=y;w.putBuffer(b);for(var M=Math.ceil(a/u),_=1;_<=M;_++){var S=new i.util.ByteBuffer;S.putBytes(m.bytes()),S.putBytes(w.bytes());for(var E=0;E<n;E++)s.start(),s.update(S.getBytes()),S=s.digest();var C=new i.util.ByteBuffer;for(h=0;h<f;h++)C.putByte(S.at(h%u));var A=Math.ceil(p/f)+Math.ceil(d/f),T=new i.util.ByteBuffer;for(o=0;o<A;o++){var B=new i.util.ByteBuffer(w.getBytes(f)),I=511;for(h=C.length()-1;h>=0;h--)I>>=8,I+=C.at(h)+B.at(h),B.setAt(h,255&I);T.putBuffer(B)}w=T,l.putBuffer(S)}return l.truncate(l.length()-a),l},s.pbe.getCipher=function(t,e,r){switch(t){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(t,e,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(t,e,r);default:var i=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw i.oid=t,i.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],i}},s.pbe.getCipherForPBES2=function(t,e,r){var n,o={},h=[];if(!a.validate(e,u,o,h))throw(n=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=h,n;if((t=a.derToOid(o.kdfOid))!==s.oids.pkcs5PBKDF2)throw(n=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=t,n.supportedOids=["pkcs5PBKDF2"],n;if((t=a.derToOid(o.encOid))!==s.oids["aes128-CBC"]&&t!==s.oids["aes192-CBC"]&&t!==s.oids["aes256-CBC"]&&t!==s.oids["des-EDE3-CBC"]&&t!==s.oids.desCBC)throw(n=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=t,n.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],n;var f,l,d=o.kdfSalt,p=i.util.createBuffer(o.kdfIterationCount);switch(p=p.getInt(p.length()<<3),s.oids[t]){case"aes128-CBC":f=16,l=i.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,l=i.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,l=i.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,l=i.des.createDecryptionCipher;break;case"desCBC":f=8,l=i.des.createDecryptionCipher}var m=c(o.prfOid),g=i.pkcs5.pbkdf2(r,d,p,f,m),y=o.encIv,v=l(g);return v.start(y),v},s.pbe.getCipherForPKCS12PBE=function(t,e,r){var n={},o=[];if(!a.validate(e,f,n,o))throw(m=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=o,m;var h,u,l,d=i.util.createBuffer(n.salt),p=i.util.createBuffer(n.iterations);switch(p=p.getInt(p.length()<<3),t){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:h=24,u=8,l=i.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:h=5,u=8,l=function(t,e){var r=i.rc2.createDecryptionCipher(t,40);return r.start(e,null),r};break;default:var m;throw(m=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=t,m}var g=c(n.prfOid),y=s.pbe.generatePkcs12Key(r,d,1,p,h,g);return g.start(),l(y,s.pbe.generatePkcs12Key(r,d,2,p,u,g))},s.pbe.opensslDeriveBytes=function(t,e,r,n){if(null==n){if(!("md5"in i.md))throw new Error('"md5" hash algorithm unavailable.');n=i.md.md5.create()}null===e&&(e="");for(var a=[l(n,t+e)],s=16,o=1;s<r;++o,s+=16)a.push(l(n,a[o-1]+t+e));return a.join("").substr(0,r)}},2723:(t,e,r)=>{"use strict";var i=r(7952),n=r(4367),a=r(3349);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(t.entropy,t.entropyEnc||"hex"),r=n.toArray(t.nonce,t.nonceEnc||"hex"),i=n.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}t.exports=s,s.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,i){"string"!=typeof e&&(i=r,r=e,e=null),t=n.toArray(t,e),r=n.toArray(r,i),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=r,r=e,e=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var s=a.slice(0,t);return this._update(r),this._reseed++,n.encode(s,e)}},2726:(t,e,r)=>{"use strict";function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function o(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}var h=r(8287).Buffer,u=r(5340).inspect,f=u&&u.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return h.alloc(0);for(var e,r,i,n=h.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=n,i=s,h.prototype.copy.call(e,r,i),s+=a.data.length,a=a.next;return n}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,i=e.data;for(t-=i.length;e=e.next;){var n=e.data,a=t>n.length?n.length:t;if(a===n.length?i+=n:i+=n.slice(0,t),0==(t-=a)){a===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(a));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=h.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,a=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,a),0==(t-=a)){a===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(a));break}++i}return this.length-=i,e}},{key:f,value:function(t,e){return u(this,n(n({},e),{},{depth:0,customInspect:!1}))}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()},2746:(t,e,r)=>{var i=r(276);r(7619),r(6418);var n=t.exports=i.asn1=i.asn1||{};function a(t,e,r){if(r>e){var i=new Error("Too few bytes to parse DER.");throw i.available=t.length(),i.remaining=e,i.requested=r,i}}function s(t,e,r,i){var o;a(t,e,2);var h=t.getByte();e--;var u=192&h,f=31&h;o=t.length();var l,c,d=function(t,e){var r=t.getByte();if(e--,128!==r){var i;if(128&r){var n=127&r;a(t,e,n),i=t.getInt(n<<3)}else i=r;if(i<0)throw new Error("Negative length: "+i);return i}}(t,e);if(e-=o-t.length(),void 0!==d&&d>e){if(i.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=t.length(),p.remaining=e,p.requested=d,p}d=e}var m=!(32&~h);if(m)if(l=[],void 0===d)for(;;){if(a(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}o=t.length(),l.push(s(t,e,r+1,i)),e-=o-t.length()}else for(;d>0;)o=t.length(),l.push(s(t,d,r+1,i)),e-=o-t.length(),d-=o-t.length();if(void 0===l&&u===n.Class.UNIVERSAL&&f===n.Type.BITSTRING&&(c=t.bytes(d)),void 0===l&&i.decodeBitStrings&&u===n.Class.UNIVERSAL&&f===n.Type.BITSTRING&&d>1){var g=t.read,y=e,v=0;if(f===n.Type.BITSTRING&&(a(t,e,1),v=t.getByte(),e--),0===v)try{o=t.length();var b=s(t,e,r+1,{strict:!0,decodeBitStrings:!0}),w=o-t.length();e-=w,f==n.Type.BITSTRING&&w++;var M=b.tagClass;w!==d||M!==n.Class.UNIVERSAL&&M!==n.Class.CONTEXT_SPECIFIC||(l=[b])}catch(t){}void 0===l&&(t.read=g,e=y)}if(void 0===l){if(void 0===d){if(i.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=e}if(f===n.Type.BMPSTRING)for(l="";d>0;d-=2)a(t,e,2),l+=String.fromCharCode(t.getInt16()),e-=2;else l=t.getBytes(d),e-=d}var _=void 0===c?null:{bitStringContents:c};return n.create(u,f,m,l,_)}n.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},n.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},n.create=function(t,e,r,a,s){if(i.util.isArray(a)){for(var o=[],h=0;h<a.length;++h)void 0!==a[h]&&o.push(a[h]);a=o}var u={tagClass:t,type:e,constructed:r,composed:r||i.util.isArray(a),value:a};return s&&"bitStringContents"in s&&(u.bitStringContents=s.bitStringContents,u.original=n.copy(u)),u},n.copy=function(t,e){var r;if(i.util.isArray(t)){r=[];for(var a=0;a<t.length;++a)r.push(n.copy(t[a],e));return r}return"string"==typeof t?t:(r={tagClass:t.tagClass,type:t.type,constructed:t.constructed,composed:t.composed,value:n.copy(t.value,e)},e&&!e.excludeBitStringContents&&(r.bitStringContents=t.bitStringContents),r)},n.equals=function(t,e,r){if(i.util.isArray(t)){if(!i.util.isArray(e))return!1;if(t.length!==e.length)return!1;for(var a=0;a<t.length;++a)if(!n.equals(t[a],e[a]))return!1;return!0}if(typeof t!=typeof e)return!1;if("string"==typeof t)return t===e;var s=t.tagClass===e.tagClass&&t.type===e.type&&t.constructed===e.constructed&&t.composed===e.composed&&n.equals(t.value,e.value);return r&&r.includeBitStringContents&&(s=s&&t.bitStringContents===e.bitStringContents),s},n.getBerValueLength=function(t){var e=t.getByte();if(128!==e)return 128&e?t.getInt((127&e)<<3):e},n.fromDer=function(t,e){void 0===e&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"==typeof e&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"string"==typeof t&&(t=i.util.createBuffer(t));var r=t.length(),n=s(t,t.length(),0,e);if(e.parseAllBytes&&0!==t.length()){var a=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw a.byteCount=r,a.remaining=t.length(),a}return n},n.toDer=function(t){var e=i.util.createBuffer(),r=t.tagClass|t.type,a=i.util.createBuffer(),s=!1;if("bitStringContents"in t&&(s=!0,t.original&&(s=n.equals(t,t.original))),s)a.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:a.putByte(0);for(var o=0;o<t.value.length;++o)void 0!==t.value[o]&&a.putBuffer(n.toDer(t.value[o]))}else if(t.type===n.Type.BMPSTRING)for(o=0;o<t.value.length;++o)a.putInt16(t.value.charCodeAt(o));else!(t.type===n.Type.INTEGER&&t.value.length>1)||(0!==t.value.charCodeAt(0)||128&t.value.charCodeAt(1))&&(255!==t.value.charCodeAt(0)||128&~t.value.charCodeAt(1))?a.putBytes(t.value):a.putBytes(t.value.substr(1));if(e.putByte(r),a.length()<=127)e.putByte(127&a.length());else{var h=a.length(),u="";do{u+=String.fromCharCode(255&h),h>>>=8}while(h>0);for(e.putByte(128|u.length),o=u.length-1;o>=0;--o)e.putByte(u.charCodeAt(o))}return e.putBuffer(a),e},n.oidToDer=function(t){var e,r,n,a,s=t.split("."),o=i.util.createBuffer();o.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var h=2;h<s.length;++h){e=!0,r=[],n=parseInt(s[h],10);do{a=127&n,n>>>=7,e||(a|=128),r.push(a),e=!1}while(n>0);for(var u=r.length-1;u>=0;--u)o.putByte(r[u])}return o},n.derToOid=function(t){var e;"string"==typeof t&&(t=i.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var n=0;t.length()>0;)n<<=7,128&(r=t.getByte())?n+=127&r:(e+="."+(n+r),n=0);return e},n.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var i=parseInt(t.substr(2,2),10)-1,n=parseInt(t.substr(4,2),10),a=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),o=0;if(t.length>11){var h=t.charAt(10),u=10;"+"!==h&&"-"!==h&&(o=parseInt(t.substr(10,2),10),u+=2)}if(e.setUTCFullYear(r,i,n),e.setUTCHours(a,s,o,0),u&&("+"===(h=t.charAt(u))||"-"===h)){var f=60*parseInt(t.substr(u+1,2),10)+parseInt(t.substr(u+4,2),10);f*=6e4,"+"===h?e.setTime(+e-f):e.setTime(+e+f)}return e},n.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),i=parseInt(t.substr(4,2),10)-1,n=parseInt(t.substr(6,2),10),a=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),h=0,u=0,f=!1;"Z"===t.charAt(t.length-1)&&(f=!0);var l=t.length-5,c=t.charAt(l);return"+"!==c&&"-"!==c||(u=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10),u*=6e4,"+"===c&&(u*=-1),f=!0),"."===t.charAt(14)&&(h=1e3*parseFloat(t.substr(14),10)),f?(e.setUTCFullYear(r,i,n),e.setUTCHours(a,s,o,h),e.setTime(+e+u)):(e.setFullYear(r,i,n),e.setHours(a,s,o,h)),e},n.dateToUtcTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var i=0;i<r.length;++i)r[i].length<2&&(e+="0"),e+=r[i];return e+"Z"},n.dateToGeneralizedTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push(""+t.getUTCFullYear()),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var i=0;i<r.length;++i)r[i].length<2&&(e+="0"),e+=r[i];return e+"Z"},n.integerToDer=function(t){var e=i.util.createBuffer();if(t>=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},n.derToInteger=function(t){"string"==typeof t&&(t=i.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},n.validate=function(t,e,r,a){var s=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)a&&(t.tagClass!==e.tagClass&&a.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&a.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(s=!0,e.value&&i.util.isArray(e.value))for(var o=0,h=0;s&&h<e.value.length;++h)s=e.value[h].optional||!1,t.value[o]&&((s=n.validate(t.value[o],e.value[h],r,a))?++o:e.value[h].optional&&(s=!0)),!s&&a&&a.push("["+e.name+'] Tag class "'+e.tagClass+'", type "'+e.type+'" expected value length "'+e.value.length+'", got "'+t.value.length+'"');if(s&&r&&(e.capture&&(r[e.capture]=t.value),e.captureAsn1&&(r[e.captureAsn1]=t),e.captureBitStringContents&&"bitStringContents"in t&&(r[e.captureBitStringContents]=t.bitStringContents),e.captureBitStringValue&&"bitStringContents"in t))if(t.bitStringContents.length<2)r[e.captureBitStringValue]="";else{if(0!==t.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[e.captureBitStringValue]=t.bitStringContents.slice(1)}}else a&&a.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+t.constructed+'"');return s};var o=/[^\\u0000-\\u00ff]/;n.prettyPrint=function(t,e,r){var a="";r=r||2,(e=e||0)>0&&(a+="\n");for(var s="",h=0;h<e*r;++h)s+=" ";switch(a+=s+"Tag: ",t.tagClass){case n.Class.UNIVERSAL:a+="Universal:";break;case n.Class.APPLICATION:a+="Application:";break;case n.Class.CONTEXT_SPECIFIC:a+="Context-Specific:";break;case n.Class.PRIVATE:a+="Private:"}if(t.tagClass===n.Class.UNIVERSAL)switch(a+=t.type,t.type){case n.Type.NONE:a+=" (None)";break;case n.Type.BOOLEAN:a+=" (Boolean)";break;case n.Type.INTEGER:a+=" (Integer)";break;case n.Type.BITSTRING:a+=" (Bit string)";break;case n.Type.OCTETSTRING:a+=" (Octet string)";break;case n.Type.NULL:a+=" (Null)";break;case n.Type.OID:a+=" (Object Identifier)";break;case n.Type.ODESC:a+=" (Object Descriptor)";break;case n.Type.EXTERNAL:a+=" (External or Instance of)";break;case n.Type.REAL:a+=" (Real)";break;case n.Type.ENUMERATED:a+=" (Enumerated)";break;case n.Type.EMBEDDED:a+=" (Embedded PDV)";break;case n.Type.UTF8:a+=" (UTF8)";break;case n.Type.ROID:a+=" (Relative Object Identifier)";break;case n.Type.SEQUENCE:a+=" (Sequence)";break;case n.Type.SET:a+=" (Set)";break;case n.Type.PRINTABLESTRING:a+=" (Printable String)";break;case n.Type.IA5String:a+=" (IA5String (ASCII))";break;case n.Type.UTCTIME:a+=" (UTC time)";break;case n.Type.GENERALIZEDTIME:a+=" (Generalized time)";break;case n.Type.BMPSTRING:a+=" (BMP String)"}else a+=t.type;if(a+="\n",a+=s+"Constructed: "+t.constructed+"\n",t.composed){var u=0,f="";for(h=0;h<t.value.length;++h)void 0!==t.value[h]&&(u+=1,f+=n.prettyPrint(t.value[h],e+1,r),h+1<t.value.length&&(f+=","));a+=s+"Sub values: "+u+f}else{if(a+=s+"Value: ",t.type===n.Type.OID){var l=n.derToOid(t.value);a+=l,i.pki&&i.pki.oids&&l in i.pki.oids&&(a+=" ("+i.pki.oids[l]+") ")}if(t.type===n.Type.INTEGER)try{a+=n.derToInteger(t.value)}catch(e){a+="0x"+i.util.bytesToHex(t.value)}else if(t.type===n.Type.BITSTRING){if(t.value.length>1?a+="0x"+i.util.bytesToHex(t.value.slice(1)):a+="(none)",t.value.length>0){var c=t.value.charCodeAt(0);1==c?a+=" (1 unused bit shown)":c>1&&(a+=" ("+c+" unused bits shown)")}}else if(t.type===n.Type.OCTETSTRING)o.test(t.value)||(a+="("+t.value+") "),a+="0x"+i.util.bytesToHex(t.value);else if(t.type===n.Type.UTF8)try{a+=i.util.decodeUtf8(t.value)}catch(e){if("URI malformed"!==e.message)throw e;a+="0x"+i.util.bytesToHex(t.value)+" (malformed UTF8)"}else t.type===n.Type.PRINTABLESTRING||t.type===n.Type.IA5String?a+=t.value:o.test(t.value)?a+="0x"+i.util.bytesToHex(t.value):0===t.value.length?a+="[null]":a+=t.value}return a}},2801:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7965).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,D=x>>>13,P=0|s[9],O=8191&P,K=P>>>13,j=0|o[0],q=8191&j,V=j>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(D,q)|0,a=Math.imul(D,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(K,q)|0,a=Math.imul(K,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(D,z)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(K,z)|0,a=Math.imul(K,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(K,Z)|0,a=Math.imul(K,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(K,Y)|0,a=Math.imul(K,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(K,$)|0,a=Math.imul(K,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(K,rt)|0,a=Math.imul(K,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(K,at)|0,a=Math.imul(K,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(D,ht)|0,a=a+Math.imul(D,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(K,ht)|0,a=Math.imul(K,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(K,lt)|0,a=Math.imul(K,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(K,pt)|0))<<13)|0;return u=((a=Math.imul(K,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2802:(t,e,r)=>{var i=t.exports=function(t){t=t.toLowerCase();var e=i[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};i.sha=r(7816),i.sha1=r(3737),i.sha224=r(6710),i.sha256=r(4107),i.sha384=r(2827),i.sha512=r(2890)},2808:(t,e,r)=>{"use strict";var i=r(3349);function n(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}t.exports=n,n.prototype._init=function(){},n.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},n.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),i=0;i<r;i++)this.buffer[this.bufferOff+i]=t[e+i];return this.bufferOff+=r,r},n.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(t){var e=0,r=0,i=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var a=t.length-(t.length-e)%this.blockSize;e<a;e+=this.blockSize)this._update(t,e,n,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},n.prototype._updateDecrypt=function(t){for(var e=0,r=0,i=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)e+=this._buffer(t,e),r+=this._flushBuffer(n,r);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},n.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},n.prototype._unpad=function(t){return t},n.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},2827:(t,e,r)=>{var i=r(6698),n=r(2890),a=r(392),s=r(2861).Buffer,o=new Array(160);function h(){this.init(),this._w=o,a.call(this,128,112)}i(h,n),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=h},2853:(t,e,r)=>{var i=e;i.der=r(2010),i.pem=r(8903)},2861:(t,e,r)=>{var i=r(8287),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(a(i,e),e.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},2884:(t,e,r)=>{var i=r(295);e.encrypt=function(t,e){var r=i(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return i(n,r)}},2890:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).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],o=new Array(160);function h(){this.init(),this._w=o,n.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function c(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0<e>>>0?1:0}i(h,n),h.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},h.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,h=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,M=0|this._bl,_=0|this._cl,S=0|this._dl,E=0|this._el,C=0|this._fl,A=0|this._gl,T=0|this._hl,B=0;B<32;B+=2)e[B]=t.readInt32BE(4*B),e[B+1]=t.readInt32BE(4*B+4);for(;B<160;B+=2){var I=e[B-30],k=e[B-30+1],R=d(I,k),N=p(k,I),L=m(I=e[B-4],k=e[B-4+1]),x=g(k,I),U=e[B-14],D=e[B-14+1],P=e[B-32],O=e[B-32+1],K=N+D|0,j=R+U+y(K,N)|0;j=(j=j+L+y(K=K+x|0,x)|0)+P+y(K=K+O|0,O)|0,e[B]=j,e[B+1]=K}for(var q=0;q<160;q+=2){j=e[q],K=e[q+1];var V=f(r,i,n),F=f(w,M,_),z=l(r,w),H=l(w,r),G=c(o,E),Z=c(E,o),W=s[q],Q=s[q+1],Y=u(o,h,v),X=u(E,C,A),J=T+Z|0,$=b+G+y(J,T)|0;$=($=($=$+Y+y(J=J+X|0,X)|0)+W+y(J=J+Q|0,Q)|0)+j+y(J=J+K|0,K)|0;var tt=H+F|0,et=z+V+y(tt,H)|0;b=v,T=A,v=h,A=C,h=o,C=E,o=a+$+y(E=S+J|0,S)|0,a=n,S=_,n=i,_=M,i=r,M=w,r=$+et+y(w=J+tt|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+M|0,this._cl=this._cl+_|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+C|0,this._gl=this._gl+A|0,this._hl=this._hl+T|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+i+y(this._bl,M)|0,this._ch=this._ch+n+y(this._cl,_)|0,this._dh=this._dh+a+y(this._dl,S)|0,this._eh=this._eh+o+y(this._el,E)|0,this._fh=this._fh+h+y(this._fl,C)|0,this._gh=this._gh+v+y(this._gl,A)|0,this._hh=this._hh+b+y(this._hl,T)|0},h.prototype._hash=function(){var t=a.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=h},2926:(t,e,r)=>{var i=r(8287).Buffer,n=r(276);r(3736),r(9356),r(2313),r(7619);var a=r(4309),s=a.publicKeyValidator,o=a.privateKeyValidator;if(void 0===h)var h=n.jsbn.BigInteger;var u=n.util.ByteBuffer,f=void 0===i?Uint8Array:i;n.pki=n.pki||{},t.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var l=n.ed25519;function c(t){var e=t.message;if(e instanceof Uint8Array||e instanceof f)return e;var r=t.encoding;if(void 0===e){if(!t.md)throw new TypeError('"options.message" or "options.md" not specified.');e=t.md.digest().getBytes(),r="binary"}if("string"==typeof e&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof e){if(void 0!==i)return i.from(e,r);e=new u(e,r)}else if(!(e instanceof u))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new f(e.length()),a=0;a<n.length;++a)n[a]=e.at(a);return n}l.constants={},l.constants.PUBLIC_KEY_BYTE_LENGTH=32,l.constants.PRIVATE_KEY_BYTE_LENGTH=64,l.constants.SEED_BYTE_LENGTH=32,l.constants.SIGN_BYTE_LENGTH=64,l.constants.HASH_BYTE_LENGTH=64,l.generateKeyPair=function(t){var e=(t=t||{}).seed;if(void 0===e)e=n.random.getBytesSync(l.constants.SEED_BYTE_LENGTH);else if("string"==typeof e){if(e.length!==l.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+l.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=c({message:e,encoding:"binary"});for(var r=new f(l.constants.PUBLIC_KEY_BYTE_LENGTH),i=new f(l.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)i[a]=e[a];return function(t,e){var r,i=[D(),D(),D(),D()],n=M(e,32);for(n[0]&=248,n[31]&=127,n[31]|=64,N(i,n),A(t,i),r=0;r<32;++r)e[r+32]=t[r]}(r,i),{publicKey:r,privateKey:i}},l.privateKeyFromAsn1=function(t){var e={},r=[];if(!n.asn1.validate(t,o,e,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=n.asn1.derToOid(e.privateKeyOid),s=n.oids.EdDSA25519;if(a!==s)throw new Error('Invalid OID "'+a+'"; OID must be "'+s+'".');var h=e.privateKey;return{privateKeyBytes:c({message:n.asn1.fromDer(h).value,encoding:"binary"})}},l.publicKeyFromAsn1=function(t){var e={},r=[];if(!n.asn1.validate(t,s,e,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=n.asn1.derToOid(e.publicKeyOid),o=n.oids.EdDSA25519;if(a!==o)throw new Error('Invalid OID "'+a+'"; OID must be "'+o+'".');var h=e.ed25519PublicKey;if(h.length!==l.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return c({message:h,encoding:"binary"})},l.publicKeyFromPrivateKey=function(t){var e=c({message:(t=t||{}).privateKey,encoding:"binary"});if(e.length!==l.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+l.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new f(l.constants.PUBLIC_KEY_BYTE_LENGTH),i=0;i<r.length;++i)r[i]=e[32+i];return r},l.sign=function(t){var e=c(t=t||{}),r=c({message:t.privateKey,encoding:"binary"});if(r.length===l.constants.SEED_BYTE_LENGTH)r=l.generateKeyPair({seed:r}).privateKey;else if(r.length!==l.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+l.constants.SEED_BYTE_LENGTH+" or "+l.constants.PRIVATE_KEY_BYTE_LENGTH);var i=new f(l.constants.SIGN_BYTE_LENGTH+e.length);!function(t,e,r,i){var n,a,s=new Float64Array(64),o=[D(),D(),D(),D()],h=M(i,32);h[0]&=248,h[31]&=127,h[31]|=64;for(n=0;n<r;++n)t[64+n]=e[n];for(n=0;n<32;++n)t[32+n]=h[32+n];var u=M(t.subarray(32),r+32);for(S(u),N(o,u),A(t,o),n=32;n<64;++n)t[n]=i[n];var f=M(t,r+64);for(S(f),n=32;n<64;++n)s[n]=0;for(n=0;n<32;++n)s[n]=u[n];for(n=0;n<32;++n)for(a=0;a<32;a++)s[n+a]+=f[n]*h[a];_(t.subarray(32),s)}(i,e,e.length,r);for(var n=new f(l.constants.SIGN_BYTE_LENGTH),a=0;a<n.length;++a)n[a]=i[a];return n},l.verify=function(t){var e=c(t=t||{});if(void 0===t.signature)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=c({message:t.signature,encoding:"binary"});if(r.length!==l.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+l.constants.SIGN_BYTE_LENGTH);var i=c({message:t.publicKey,encoding:"binary"});if(i.length!==l.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+l.constants.PUBLIC_KEY_BYTE_LENGTH);var n,a=new f(l.constants.SIGN_BYTE_LENGTH+e.length),s=new f(l.constants.SIGN_BYTE_LENGTH+e.length);for(n=0;n<l.constants.SIGN_BYTE_LENGTH;++n)a[n]=r[n];for(n=0;n<e.length;++n)a[n+l.constants.SIGN_BYTE_LENGTH]=e[n];return function(t,e,r,i){var n,a=new f(32),s=[D(),D(),D(),D()],o=[D(),D(),D(),D()];if(r<64)return-1;if(function(t,e){var r=D(),i=D(),n=D(),a=D(),s=D(),o=D(),h=D();return L(t[2],p),function(t,e){var r;for(r=0;r<16;++r)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}(t[1],e),K(n,t[1]),j(a,n,m),O(n,n,t[2]),P(a,t[2],a),K(s,a),K(o,s),j(h,o,s),j(r,h,n),j(r,r,a),function(t,e){var r,i=D();for(r=0;r<16;++r)i[r]=e[r];for(r=250;r>=0;--r)K(i,i),1!==r&&j(i,i,e);for(r=0;r<16;++r)t[r]=i[r]}(r,r),j(r,r,n),j(r,r,a),j(r,r,a),j(t[0],r,a),K(i,t[0]),j(i,i,a),B(i,n)&&j(t[0],t[0],w),K(i,t[0]),j(i,i,a),B(i,n)?-1:(k(t[0])===e[31]>>7&&O(t[0],d,t[0]),j(t[3],t[0],t[1]),0)}(o,i))return-1;for(n=0;n<r;++n)t[n]=e[n];for(n=0;n<32;++n)t[n+32]=i[n];var h=M(t,r);if(S(h),R(s,o,h),N(o,e.subarray(32)),E(s,o),A(a,s),r-=64,I(e,0,a,0)){for(n=0;n<r;++n)t[n]=0;return-1}for(n=0;n<r;++n)t[n]=e[n+64];return r}(s,a,a.length,i)>=0};var d=D(),p=D([1]),m=D([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=D([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),y=D([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),v=D([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),b=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]),w=D([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function M(t,e){var r=n.md.sha512.create(),a=new u(t);r.update(a.getBytes(e),"binary");var s=r.digest().getBytes();if(void 0!==i)return i.from(s,"binary");for(var o=new f(l.constants.HASH_BYTE_LENGTH),h=0;h<64;++h)o[h]=s.charCodeAt(h);return o}function _(t,e){var r,i,n,a;for(i=63;i>=32;--i){for(r=0,n=i-32,a=i-12;n<a;++n)e[n]+=r-16*e[i]*b[n-(i-32)],r=e[n]+128>>8,e[n]-=256*r;e[n]+=r,e[i]=0}for(r=0,n=0;n<32;++n)e[n]+=r-(e[31]>>4)*b[n],r=e[n]>>8,e[n]&=255;for(n=0;n<32;++n)e[n]-=r*b[n];for(i=0;i<32;++i)e[i+1]+=e[i]>>8,t[i]=255&e[i]}function S(t){for(var e=new Float64Array(64),r=0;r<64;++r)e[r]=t[r],t[r]=0;_(t,e)}function E(t,e){var r=D(),i=D(),n=D(),a=D(),s=D(),o=D(),h=D(),u=D(),f=D();O(r,t[1],t[0]),O(f,e[1],e[0]),j(r,r,f),P(i,t[0],t[1]),P(f,e[0],e[1]),j(i,i,f),j(n,t[3],e[3]),j(n,n,g),j(a,t[2],e[2]),P(a,a,a),O(s,i,r),O(o,a,n),P(h,a,n),P(u,i,r),j(t[0],s,o),j(t[1],u,h),j(t[2],h,o),j(t[3],s,u)}function C(t,e,r){for(var i=0;i<4;++i)U(t[i],e[i],r)}function A(t,e){var r=D(),i=D(),n=D();!function(t,e){var r,i=D();for(r=0;r<16;++r)i[r]=e[r];for(r=253;r>=0;--r)K(i,i),2!==r&&4!==r&&j(i,i,e);for(r=0;r<16;++r)t[r]=i[r]}(n,e[2]),j(r,e[0],n),j(i,e[1],n),T(t,i),t[31]^=k(r)<<7}function T(t,e){var r,i,n,a=D(),s=D();for(r=0;r<16;++r)s[r]=e[r];for(x(s),x(s),x(s),i=0;i<2;++i){for(a[0]=s[0]-65517,r=1;r<15;++r)a[r]=s[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),n=a[15]>>16&1,a[14]&=65535,U(s,a,1-n)}for(r=0;r<16;r++)t[2*r]=255&s[r],t[2*r+1]=s[r]>>8}function B(t,e){var r=new f(32),i=new f(32);return T(r,t),T(i,e),I(r,0,i,0)}function I(t,e,r,i){return function(t,e,r,i){var n,a=0;for(n=0;n<32;++n)a|=t[e+n]^r[i+n];return(1&a-1>>>8)-1}(t,e,r,i)}function k(t){var e=new f(32);return T(e,t),1&e[0]}function R(t,e,r){var i,n;for(L(t[0],d),L(t[1],p),L(t[2],p),L(t[3],d),n=255;n>=0;--n)C(t,e,i=r[n/8|0]>>(7&n)&1),E(e,t),E(t,t),C(t,e,i)}function N(t,e){var r=[D(),D(),D(),D()];L(r[0],y),L(r[1],v),L(r[2],p),j(r[3],y,v),R(t,r,e)}function L(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function x(t){var e,r,i=1;for(e=0;e<16;++e)r=t[e]+i+65535,i=Math.floor(r/65536),t[e]=r-65536*i;t[0]+=i-1+37*(i-1)}function U(t,e,r){for(var i,n=~(r-1),a=0;a<16;++a)i=n&(t[a]^e[a]),t[a]^=i,e[a]^=i}function D(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;++e)r[e]=t[e];return r}function P(t,e,r){for(var i=0;i<16;++i)t[i]=e[i]+r[i]}function O(t,e,r){for(var i=0;i<16;++i)t[i]=e[i]-r[i]}function K(t,e){j(t,e,e)}function j(t,e,r){var i,n,a=0,s=0,o=0,h=0,u=0,f=0,l=0,c=0,d=0,p=0,m=0,g=0,y=0,v=0,b=0,w=0,M=0,_=0,S=0,E=0,C=0,A=0,T=0,B=0,I=0,k=0,R=0,N=0,L=0,x=0,U=0,D=r[0],P=r[1],O=r[2],K=r[3],j=r[4],q=r[5],V=r[6],F=r[7],z=r[8],H=r[9],G=r[10],Z=r[11],W=r[12],Q=r[13],Y=r[14],X=r[15];a+=(i=e[0])*D,s+=i*P,o+=i*O,h+=i*K,u+=i*j,f+=i*q,l+=i*V,c+=i*F,d+=i*z,p+=i*H,m+=i*G,g+=i*Z,y+=i*W,v+=i*Q,b+=i*Y,w+=i*X,s+=(i=e[1])*D,o+=i*P,h+=i*O,u+=i*K,f+=i*j,l+=i*q,c+=i*V,d+=i*F,p+=i*z,m+=i*H,g+=i*G,y+=i*Z,v+=i*W,b+=i*Q,w+=i*Y,M+=i*X,o+=(i=e[2])*D,h+=i*P,u+=i*O,f+=i*K,l+=i*j,c+=i*q,d+=i*V,p+=i*F,m+=i*z,g+=i*H,y+=i*G,v+=i*Z,b+=i*W,w+=i*Q,M+=i*Y,_+=i*X,h+=(i=e[3])*D,u+=i*P,f+=i*O,l+=i*K,c+=i*j,d+=i*q,p+=i*V,m+=i*F,g+=i*z,y+=i*H,v+=i*G,b+=i*Z,w+=i*W,M+=i*Q,_+=i*Y,S+=i*X,u+=(i=e[4])*D,f+=i*P,l+=i*O,c+=i*K,d+=i*j,p+=i*q,m+=i*V,g+=i*F,y+=i*z,v+=i*H,b+=i*G,w+=i*Z,M+=i*W,_+=i*Q,S+=i*Y,E+=i*X,f+=(i=e[5])*D,l+=i*P,c+=i*O,d+=i*K,p+=i*j,m+=i*q,g+=i*V,y+=i*F,v+=i*z,b+=i*H,w+=i*G,M+=i*Z,_+=i*W,S+=i*Q,E+=i*Y,C+=i*X,l+=(i=e[6])*D,c+=i*P,d+=i*O,p+=i*K,m+=i*j,g+=i*q,y+=i*V,v+=i*F,b+=i*z,w+=i*H,M+=i*G,_+=i*Z,S+=i*W,E+=i*Q,C+=i*Y,A+=i*X,c+=(i=e[7])*D,d+=i*P,p+=i*O,m+=i*K,g+=i*j,y+=i*q,v+=i*V,b+=i*F,w+=i*z,M+=i*H,_+=i*G,S+=i*Z,E+=i*W,C+=i*Q,A+=i*Y,T+=i*X,d+=(i=e[8])*D,p+=i*P,m+=i*O,g+=i*K,y+=i*j,v+=i*q,b+=i*V,w+=i*F,M+=i*z,_+=i*H,S+=i*G,E+=i*Z,C+=i*W,A+=i*Q,T+=i*Y,B+=i*X,p+=(i=e[9])*D,m+=i*P,g+=i*O,y+=i*K,v+=i*j,b+=i*q,w+=i*V,M+=i*F,_+=i*z,S+=i*H,E+=i*G,C+=i*Z,A+=i*W,T+=i*Q,B+=i*Y,I+=i*X,m+=(i=e[10])*D,g+=i*P,y+=i*O,v+=i*K,b+=i*j,w+=i*q,M+=i*V,_+=i*F,S+=i*z,E+=i*H,C+=i*G,A+=i*Z,T+=i*W,B+=i*Q,I+=i*Y,k+=i*X,g+=(i=e[11])*D,y+=i*P,v+=i*O,b+=i*K,w+=i*j,M+=i*q,_+=i*V,S+=i*F,E+=i*z,C+=i*H,A+=i*G,T+=i*Z,B+=i*W,I+=i*Q,k+=i*Y,R+=i*X,y+=(i=e[12])*D,v+=i*P,b+=i*O,w+=i*K,M+=i*j,_+=i*q,S+=i*V,E+=i*F,C+=i*z,A+=i*H,T+=i*G,B+=i*Z,I+=i*W,k+=i*Q,R+=i*Y,N+=i*X,v+=(i=e[13])*D,b+=i*P,w+=i*O,M+=i*K,_+=i*j,S+=i*q,E+=i*V,C+=i*F,A+=i*z,T+=i*H,B+=i*G,I+=i*Z,k+=i*W,R+=i*Q,N+=i*Y,L+=i*X,b+=(i=e[14])*D,w+=i*P,M+=i*O,_+=i*K,S+=i*j,E+=i*q,C+=i*V,A+=i*F,T+=i*z,B+=i*H,I+=i*G,k+=i*Z,R+=i*W,N+=i*Q,L+=i*Y,x+=i*X,w+=(i=e[15])*D,s+=38*(_+=i*O),o+=38*(S+=i*K),h+=38*(E+=i*j),u+=38*(C+=i*q),f+=38*(A+=i*V),l+=38*(T+=i*F),c+=38*(B+=i*z),d+=38*(I+=i*H),p+=38*(k+=i*G),m+=38*(R+=i*Z),g+=38*(N+=i*W),y+=38*(L+=i*Q),v+=38*(x+=i*Y),b+=38*(U+=i*X),a=(i=(a+=38*(M+=i*P))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),s=(i=s+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),v=(i=v+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),a=(i=(a+=n-1+37*(n-1))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),s=(i=s+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),v=(i=v+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),a+=n-1+37*(n-1),t[0]=a,t[1]=s,t[2]=o,t[3]=h,t[4]=u,t[5]=f,t[6]=l,t[7]=c,t[8]=d,t[9]=p,t[10]=m,t[11]=g,t[12]=y,t[13]=v,t[14]=b,t[15]=w}},2951:t=>{"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},2955:(t,e,r)=>{"use strict";var i,n=r(5606);function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(6238),o=Symbol("lastResolve"),h=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function m(t){var e=t[o];if(null!==e){var r=t[d].read();null!==r&&(t[l]=null,t[o]=null,t[h]=null,e(p(r,!1)))}}function g(t){n.nextTick(m,t)}var y=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((a(i={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){n.nextTick((function(){t[u]?r(t[u]):e(p(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(r,i){t.then((function(){e[f]?r(p(void 0,!0)):e[c](r,i)}),i)}}(i,this));else{var a=this[d].read();if(null!==a)return Promise.resolve(p(a,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),a(i,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),i),y);t.exports=function(t){var e,r=Object.create(v,(a(e={},d,{value:t,writable:!0}),a(e,o,{value:null,writable:!0}),a(e,h,{value:null,writable:!0}),a(e,u,{value:null,writable:!0}),a(e,f,{value:t._readableState.endEmitted,writable:!0}),a(e,c,{value:function(t,e){var i=r[d].read();i?(r[l]=null,r[o]=null,r[h]=null,t(p(i,!1))):(r[o]=t,r[h]=e)},writable:!0}),e));return r[l]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[h];return null!==e&&(r[l]=null,r[o]=null,r[h]=null,e(t)),void(r[u]=t)}var i=r[o];null!==i&&(r[l]=null,r[o]=null,r[h]=null,i(p(void 0,!0))),r[f]=!0})),t.on("readable",g.bind(null,r)),r}},3053:(t,e,r)=>{var i=r(295),n=r(2861).Buffer,a=r(5122);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return a(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),a=t._cache.length;t._cache=n.concat([t._cache,n.allocUnsafe(16*r)]);for(var o=0;o<r;o++){var h=s(t),u=a+16*o;t._cache.writeUInt32BE(h[0],u+0),t._cache.writeUInt32BE(h[1],u+4),t._cache.writeUInt32BE(h[2],u+8),t._cache.writeUInt32BE(h[3],u+12)}var f=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,f)}},3141:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.I=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=s(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},3209:(t,e,r)=>{"use strict";var i=r(5606),n=65536,a=r(2861).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>n)for(var o=0;o<t;o+=n)s.getRandomValues(r.slice(o,o+n));else s.getRandomValues(r);return"function"==typeof e?i.nextTick((function(){e(null,r)})):r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},3219:t=>{"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},3225:(t,e,r)=>{"use strict";var i=r(5606);void 0===i||!i.version||0===i.version.indexOf("v0.")||0===i.version.indexOf("v1.")&&0!==i.version.indexOf("v1.8.")?t.exports={nextTick:function(t,e,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,s,o=arguments.length;switch(o){case 0:case 1:return i.nextTick(t);case 2:return i.nextTick((function(){t.call(null,e)}));case 3:return i.nextTick((function(){t.call(null,e,r)}));case 4:return i.nextTick((function(){t.call(null,e,r,n)}));default:for(a=new Array(o-1),s=0;s<a.length;)a[s++]=arguments[s];return i.nextTick((function(){t.apply(null,a)}))}}}:t.exports=i},3241:t=>{"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},3254:(t,e,r)=>{var i=r(8287).Buffer,n=r(276);r(1696),r(8106),r(7619);var a,s=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(a=r(310)),t.exports=n.pbkdf2=s.pbkdf2=function(t,e,r,s,o,h){if("function"==typeof o&&(h=o,o=null),n.util.isNodejs&&!n.options.usePureJavaScript&&a.pbkdf2&&(null===o||"object"!=typeof o)&&(a.pbkdf2Sync.length>4||!o||"sha1"===o))return"string"!=typeof o&&(o="sha1"),t=i.from(t,"binary"),e=i.from(e,"binary"),h?4===a.pbkdf2Sync.length?a.pbkdf2(t,e,r,s,(function(t,e){if(t)return h(t);h(null,e.toString("binary"))})):a.pbkdf2(t,e,r,s,o,(function(t,e){if(t)return h(t);h(null,e.toString("binary"))})):4===a.pbkdf2Sync.length?a.pbkdf2Sync(t,e,r,s).toString("binary"):a.pbkdf2Sync(t,e,r,s,o).toString("binary");if(null==o&&(o="sha1"),"string"==typeof o){if(!(o in n.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=n.md[o].create()}var u=o.digestLength;if(s>4294967295*u){var f=new Error("Derived key is too long.");if(h)return h(f);throw f}var l=Math.ceil(s/u),c=s-(l-1)*u,d=n.hmac.create();d.start(o,t);var p,m,g,y="";if(!h){for(var v=1;v<=l;++v){d.start(null,null),d.update(e),d.update(n.util.int32ToBytes(v)),p=g=d.digest().getBytes();for(var b=2;b<=r;++b)d.start(null,null),d.update(g),m=d.digest().getBytes(),p=n.util.xorBytes(p,m,u),g=m;y+=v<l?p:p.substr(0,c)}return y}function w(){if(v>l)return h(null,y);d.start(null,null),d.update(e),d.update(n.util.int32ToBytes(v)),p=g=d.digest().getBytes(),b=2,M()}function M(){if(b<=r)return d.start(null,null),d.update(g),m=d.digest().getBytes(),p=n.util.xorBytes(p,m,u),g=m,++b,n.util.setImmediate(M);y+=v<l?p:p.substr(0,c),++v,w()}v=1,w()}},3349:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},3382:(t,e,r)=>{var i=r(2861).Buffer;t.exports=function(t,e,r){if(i.isBuffer(t))return t;if("string"==typeof t)return i.from(t,e);if(ArrayBuffer.isView(t))return i.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},3389:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698),a={};function s(t){i.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}n(e,t);for(var r=Object.keys(a),i=0;i<r.length;i++){var s=r[i];e.prototype[s]=a[s]}return e.create=function(t){return new e(t)},e},a._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},a._update=function(t,e,r,i){var n=this._cbcState,a=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var o=0;o<this.blockSize;o++)s[o]^=t[e+o];for(a._update.call(this,s,0,r,i),o=0;o<this.blockSize;o++)s[o]=r[i+o]}else{for(a._update.call(this,t,e,r,i),o=0;o<this.blockSize;o++)r[i+o]^=s[o];for(o=0;o<this.blockSize;o++)s[o]=t[e+o]}}},3432:(t,e,r)=>{var i=r(276);r(7619),r(9356),r(3736),t.exports=i.kem=i.kem||{};var n=i.jsbn.BigInteger;function a(t,e,r,n){t.generate=function(t,a){for(var s=new i.util.ByteBuffer,o=Math.ceil(a/n)+r,h=new i.util.ByteBuffer,u=r;u<o;++u){h.putInt32(u),e.start(),e.update(t+h.getBytes());var f=e.digest();s.putBytes(f.getBytes(n))}return s.truncate(s.length()-a),s.getBytes()}}i.kem.rsa={},i.kem.rsa.create=function(t,e){var r=(e=e||{}).prng||i.random;return{encrypt:function(e,a){var s,o=Math.ceil(e.n.bitLength()/8);do{s=new n(i.util.bytesToHex(r.getBytesSync(o)),16).mod(e.n)}while(s.compareTo(n.ONE)<=0);var h=o-(s=i.util.hexToBytes(s.toString(16))).length;return h>0&&(s=i.util.fillString(String.fromCharCode(0),h)+s),{encapsulation:e.encrypt(s,"NONE"),key:t.generate(s,a)}},decrypt:function(e,r,i){var n=e.decrypt(r,"NONE");return t.generate(n,i)}}},i.kem.kdf1=function(t,e){a(this,t,0,e||t.digestLength)},i.kem.kdf2=function(t,e){a(this,t,1,e||t.digestLength)}},3507:(t,e,r)=>{"use strict";var i=r(6698),n=r(1800),a=r(6168),s=r(2861).Buffer,o=r(320),h=r(6011),u=r(2802),f=s.alloc(128);function l(t,e){a.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>r?e=("rmd160"===t?new h:u(t)).update(e).digest():e.length<r&&(e=s.concat([e,f],r));for(var i=this._ipad=s.allocUnsafe(r),n=this._opad=s.allocUnsafe(r),o=0;o<r;o++)i[o]=54^e[o],n[o]=92^e[o];this._hash="rmd160"===t?new h:u(t),this._hash.update(i)}i(l,a),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new h:u(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new n(o,e):new l(t,e)}},3600:(t,e,r)=>{"use strict";t.exports=n;var i=r(4610);function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}r(6698)(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},3736:(t,e,r)=>{var i,n=r(276);function a(t,e,r){this.data=[],null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function s(){return new a(null)}function o(t,e,r,i,n,a){for(var s=16383&e,o=e>>14;--a>=0;){var h=16383&this.data[t],u=this.data[t++]>>14,f=o*h+u*s;n=((h=s*h+((16383&f)<<14)+r.data[i]+n)>>28)+(f>>14)+o*u,r.data[i++]=268435455&h}return n}t.exports=n.jsbn=n.jsbn||{},n.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=o,i=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(t,e,r,i,n,a){for(var s=32767&e,o=e>>15;--a>=0;){var h=32767&this.data[t],u=this.data[t++]>>15,f=o*h+u*s;n=((h=s*h+((32767&f)<<15)+r.data[i]+(1073741823&n))>>>30)+(f>>>15)+o*u+(n>>>30),r.data[i++]=1073741823&h}return n},i=30):"Netscape"!=navigator.appName?(a.prototype.am=function(t,e,r,i,n,a){for(;--a>=0;){var s=e*this.data[t++]+r.data[i]+n;n=Math.floor(s/67108864),r.data[i++]=67108863&s}return n},i=26):(a.prototype.am=o,i=28),a.prototype.DB=i,a.prototype.DM=(1<<i)-1,a.prototype.DV=1<<i,a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-i,a.prototype.F2=2*i-52;var h,u,f=new Array;for(h="0".charCodeAt(0),u=0;u<=9;++u)f[h++]=u;for(h="a".charCodeAt(0),u=10;u<36;++u)f[h++]=u;for(h="A".charCodeAt(0),u=10;u<36;++u)f[h++]=u;function l(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function c(t,e){var r=f[t.charCodeAt(e)];return null==r?-1:r}function d(t){var e=s();return e.fromInt(t),e}function p(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function m(t){this.m=t}function g(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function y(t,e){return t&e}function v(t,e){return t|e}function b(t,e){return t^e}function w(t,e){return t&~e}function M(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function _(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function S(){}function E(t){return t}function C(t){this.r2=s(),this.q3=s(),a.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}m.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},m.prototype.revert=function(t){return t},m.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},m.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},m.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},g.prototype.convert=function(t){var e=s();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(a.ZERO)>0&&this.m.subTo(e,e),e},g.prototype.revert=function(t){var e=s();return t.copyTo(e),this.reduce(e),e},g.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t.data[e],i=r*this.mpl+((r*this.mph+(t.data[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,i,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},g.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},a.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},a.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},a.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,n=!1,s=0;--i>=0;){var o=8==r?255&t[i]:c(t,i);o<0?"-"==t.charAt(i)&&(n=!0):(n=!1,0==s?this.data[this.t++]=o:s+r>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this.data[this.t++]=o>>this.DB-s):this.data[this.t-1]|=o<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&128&t[0]&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),n&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this.data[this.t-1]==t;)--this.t},a.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s},a.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e.data[r-t]=this.data[r];e.t=Math.max(this.t-t,0),e.s=this.s},a.prototype.lShiftTo=function(t,e){var r,i=t%this.DB,n=this.DB-i,a=(1<<n)-1,s=Math.floor(t/this.DB),o=this.s<<i&this.DM;for(r=this.t-1;r>=0;--r)e.data[r+s+1]=this.data[r]>>n|o,o=(this.data[r]&a)<<i;for(r=s-1;r>=0;--r)e.data[r]=0;e.data[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},a.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,a=(1<<i)-1;e.data[0]=this.data[r]>>i;for(var s=r+1;s<this.t;++s)e.data[s-r-1]|=(this.data[s]&a)<<n,e.data[s-r]=this.data[s]>>i;i>0&&(e.data[this.t-r-1]|=(this.s&a)<<n),e.t=this.t-r,e.clamp()}},a.prototype.subTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this.data[r]-t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e.data[r++]=this.DV+i:i>0&&(e.data[r++]=i),e.t=r,e.clamp()},a.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),n=r.t;for(e.t=n+i.t;--n>=0;)e.data[n]=0;for(n=0;n<i.t;++n)e.data[n+r.t]=r.am(0,i.data[n],e,n,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&a.ZERO.subTo(e,e)},a.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t.data[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e.data[r],t,2*r,0,1);(t.data[r+e.t]+=e.am(r+1,2*e.data[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()},a.prototype.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var n=this.abs();if(n.t<i.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=s());var o=s(),h=this.s,u=t.s,f=this.DB-p(i.data[i.t-1]);f>0?(i.lShiftTo(f,o),n.lShiftTo(f,r)):(i.copyTo(o),n.copyTo(r));var l=o.t,c=o.data[l-1];if(0!=c){var d=c*(1<<this.F1)+(l>1?o.data[l-2]>>this.F2:0),m=this.FV/d,g=(1<<this.F1)/d,y=1<<this.F2,v=r.t,b=v-l,w=null==e?s():e;for(o.dlShiftTo(b,w),r.compareTo(w)>=0&&(r.data[r.t++]=1,r.subTo(w,r)),a.ONE.dlShiftTo(l,w),w.subTo(o,o);o.t<l;)o.data[o.t++]=0;for(;--b>=0;){var M=r.data[--v]==c?this.DM:Math.floor(r.data[v]*m+(r.data[v-1]+y)*g);if((r.data[v]+=o.am(0,M,r,b,0,l))<M)for(o.dlShiftTo(b,w),r.subTo(w,r);r.data[v]<--M;)r.subTo(w,r)}null!=e&&(r.drShiftTo(l,e),h!=u&&a.ZERO.subTo(e,e)),r.t=l,r.clamp(),f>0&&r.rShiftTo(f,r),h<0&&a.ZERO.subTo(r,r)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(t,e){if(t>4294967295||t<1)return a.ONE;var r=s(),i=s(),n=e.convert(this),o=p(t)-1;for(n.copyTo(r);--o>=0;)if(e.sqrTo(r,i),(t&1<<o)>0)e.mulTo(i,n,r);else{var h=r;r=i,i=h}return e.revert(r)},a.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,n=!1,a="",s=this.t,o=this.DB-s*this.DB%e;if(s-- >0)for(o<this.DB&&(r=this.data[s]>>o)>0&&(n=!0,a=l(r));s>=0;)o<e?(r=(this.data[s]&(1<<o)-1)<<e-o,r|=this.data[--s]>>(o+=this.DB-e)):(r=this.data[s]>>(o-=e)&i,o<=0&&(o+=this.DB,--s)),r>0&&(n=!0),n&&(a+=l(r));return n?a:"0"},a.prototype.negate=function(){var t=s();return a.ZERO.subTo(this,t),t},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this.data[r]-t.data[r]))return e;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(a.ZERO)>0&&t.subTo(e,e),e},a.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new m(e):new g(e),this.exp(t,r)},a.ZERO=d(0),a.ONE=d(1),S.prototype.convert=E,S.prototype.revert=E,S.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},S.prototype.sqrTo=function(t,e){t.squareTo(e)},C.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e},C.prototype.revert=function(t){return t},C.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},C.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},C.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var A=[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],T=(1<<26)/A[A.length-1];a.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},a.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=d(r),n=s(),a=s(),o="";for(this.divRemTo(i,n,a);n.signum()>0;)o=(r+a.intValue()).toString(t).substr(1)+o,n.divRemTo(i,n,a);return a.intValue().toString(t)+o},a.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),n=!1,s=0,o=0,h=0;h<t.length;++h){var u=c(t,h);u<0?"-"==t.charAt(h)&&0==this.signum()&&(n=!0):(o=e*o+u,++s>=r&&(this.dMultiply(i),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(o,0)),n&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(a.ONE.shiftLeft(t-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(a.ONE.shiftLeft(t-1),this);else{var i=new Array,n=7&t;i.length=1+(t>>3),e.nextBytes(i),n>0?i[0]&=(1<<n)-1:i[0]=0,this.fromString(i,256)}},a.prototype.bitwiseTo=function(t,e,r){var i,n,a=Math.min(t.t,this.t);for(i=0;i<a;++i)r.data[i]=e(this.data[i],t.data[i]);if(t.t<this.t){for(n=t.s&this.DM,i=a;i<this.t;++i)r.data[i]=e(this.data[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=a;i<t.t;++i)r.data[i]=e(n,t.data[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},a.prototype.changeBit=function(t,e){var r=a.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},a.prototype.addTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this.data[r]+t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e.data[r++]=i:i<-1&&(e.data[r++]=this.DV+i),e.t=r,e.clamp()},a.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},a.prototype.multiplyLowerTo=function(t,e,r){var i,n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;for(i=r.t-this.t;n<i;++n)r.data[n+this.t]=this.am(0,t.data[n],r,n,0,this.t);for(i=Math.min(t.t,e);n<i;++n)this.am(0,t.data[n],r,n,0,e-n);r.clamp()},a.prototype.multiplyUpperTo=function(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r.data[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r.data[this.t+i-e]=this.am(e-i,t.data[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)},a.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this.data[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this.data[i])%t;return r},a.prototype.millerRabin=function(t){var e=this.subtract(a.ONE),r=e.getLowestSetBit();if(r<=0)return!1;for(var i,n=e.shiftRight(r),s={nextBytes:function(t){for(var e=0;e<t.length;++e)t[e]=Math.floor(256*Math.random())}},o=0;o<t;++o){do{i=new a(this.bitLength(),s)}while(i.compareTo(a.ONE)<=0||i.compareTo(e)>=0);var h=i.modPow(n,this);if(0!=h.compareTo(a.ONE)&&0!=h.compareTo(e)){for(var u=1;u++<r&&0!=h.compareTo(e);)if(0==(h=h.modPowInt(2,this)).compareTo(a.ONE))return!1;if(0!=h.compareTo(e))return!1}}return!0},a.prototype.clone=function(){var t=s();return this.copyTo(t),t},a.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},a.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i<this.DB&&(r=this.data[t]>>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<<this.DB-i);t>=0;)i<8?(r=(this.data[t]&(1<<i)-1)<<8-i,r|=this.data[--t]>>(i+=this.DB-8)):(r=this.data[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),128&r&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},a.prototype.equals=function(t){return 0==this.compareTo(t)},a.prototype.min=function(t){return this.compareTo(t)<0?this:t},a.prototype.max=function(t){return this.compareTo(t)>0?this:t},a.prototype.and=function(t){var e=s();return this.bitwiseTo(t,y,e),e},a.prototype.or=function(t){var e=s();return this.bitwiseTo(t,v,e),e},a.prototype.xor=function(t){var e=s();return this.bitwiseTo(t,b,e),e},a.prototype.andNot=function(t){var e=s();return this.bitwiseTo(t,w,e),e},a.prototype.not=function(){for(var t=s(),e=0;e<this.t;++e)t.data[e]=this.DM&~this.data[e];return t.t=this.t,t.s=~this.s,t},a.prototype.shiftLeft=function(t){var e=s();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},a.prototype.shiftRight=function(t){var e=s();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},a.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this.data[t])return t*this.DB+M(this.data[t]);return this.s<0?this.t*this.DB:-1},a.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=_(this.data[r]^e);return t},a.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this.data[e]&1<<t%this.DB)},a.prototype.setBit=function(t){return this.changeBit(t,v)},a.prototype.clearBit=function(t){return this.changeBit(t,w)},a.prototype.flipBit=function(t){return this.changeBit(t,b)},a.prototype.add=function(t){var e=s();return this.addTo(t,e),e},a.prototype.subtract=function(t){var e=s();return this.subTo(t,e),e},a.prototype.multiply=function(t){var e=s();return this.multiplyTo(t,e),e},a.prototype.divide=function(t){var e=s();return this.divRemTo(t,e,null),e},a.prototype.remainder=function(t){var e=s();return this.divRemTo(t,null,e),e},a.prototype.divideAndRemainder=function(t){var e=s(),r=s();return this.divRemTo(t,e,r),new Array(e,r)},a.prototype.modPow=function(t,e){var r,i,n=t.bitLength(),a=d(1);if(n<=0)return a;r=n<18?1:n<48?3:n<144?4:n<768?5:6,i=n<8?new m(e):e.isEven()?new C(e):new g(e);var o=new Array,h=3,u=r-1,f=(1<<r)-1;if(o[1]=i.convert(this),r>1){var l=s();for(i.sqrTo(o[1],l);h<=f;)o[h]=s(),i.mulTo(l,o[h-2],o[h]),h+=2}var c,y,v=t.t-1,b=!0,w=s();for(n=p(t.data[v])-1;v>=0;){for(n>=u?c=t.data[v]>>n-u&f:(c=(t.data[v]&(1<<n+1)-1)<<u-n,v>0&&(c|=t.data[v-1]>>this.DB+n-u)),h=r;!(1&c);)c>>=1,--h;if((n-=h)<0&&(n+=this.DB,--v),b)o[c].copyTo(a),b=!1;else{for(;h>1;)i.sqrTo(a,w),i.sqrTo(w,a),h-=2;h>0?i.sqrTo(a,w):(y=a,a=w,w=y),i.mulTo(w,o[c],a)}for(;v>=0&&!(t.data[v]&1<<n);)i.sqrTo(a,w),y=a,a=w,w=y,--n<0&&(n=this.DB-1,--v)}return i.revert(a)},a.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return a.ZERO;for(var r=t.clone(),i=this.clone(),n=d(1),s=d(0),o=d(0),h=d(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(n.isEven()&&s.isEven()||(n.addTo(this,n),s.subTo(t,s)),n.rShiftTo(1,n)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(o.isEven()&&h.isEven()||(o.addTo(this,o),h.subTo(t,h)),o.rShiftTo(1,o)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);r.compareTo(i)>=0?(r.subTo(i,r),e&&n.subTo(o,n),s.subTo(h,s)):(i.subTo(r,i),e&&o.subTo(n,o),h.subTo(s,h))}return 0!=i.compareTo(a.ONE)?a.ZERO:h.compareTo(t)>=0?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},a.prototype.pow=function(t){return this.exp(t,new S)},a.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return e;for(n<a&&(a=n),a>0&&(e.rShiftTo(a,e),r.rShiftTo(a,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},a.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r.data[0]<=A[A.length-1]){for(e=0;e<A.length;++e)if(r.data[0]==A[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<A.length;){for(var i=A[e],n=e+1;n<A.length&&i<T;)i*=A[n++];for(i=r.modInt(i);e<n;)if(i%A[e++]==0)return!1}return r.millerRabin(t)}},3737:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,h=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=(e=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=u(i)+l(p,n,a,o)+h+r[d]+s[p]|0;h=o,o=a,a=f(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},3766:()=>{},3776:()=>{},3832:(t,e,r)=>{var i,n,a=r(2861).Buffer,s=r(4196),o=r(2455),h=r(1352),u=r(3382),f=r.g.crypto&&r.g.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},c=[];function d(){return n||(n=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(t,e,r,i,n){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},t,i<<3)})).then((function(t){return a.from(t)}))}t.exports=function(t,e,n,m,g,y){"function"==typeof g&&(y=g,g=void 0);var v=l[(g=g||"sha1").toLowerCase()];if(v&&"function"==typeof r.g.Promise){if(s(n,m),t=u(t,o,"Password"),e=u(e,o,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){d()((function(){e(null,t)}))}),(function(t){d()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==c[t])return c[t];var e=p(i=i||a.alloc(8),i,10,128,t).then((function(){return!0})).catch((function(){return!1}));return c[t]=e,e}(v).then((function(r){return r?p(t,e,n,m,v):h(t,e,n,m,g)})),y)}else d()((function(){var r;try{r=h(t,e,n,m,g)}catch(t){return y(t)}y(null,r)}))}},3878:(t,e,r)=>{var i=r(5606),n=r(276);r(7619);var a=null;!n.util.isNodejs||n.options.usePureJavaScript||i.versions["node-webkit"]||(a=r(310)),(t.exports=n.prng=n.prng||{}).create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=t.md,i=new Array(32),s=0;s<32;++s)i[s]=r.create();function o(){if(e.pools[0].messageLength>=32)return h();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),h()}function h(){e.reseeds=4294967295===e.reseeds?0:e.reseeds+1;var t=e.plugin.md.create();t.update(e.keyBytes);for(var r=1,i=0;i<32;++i)e.reseeds%r==0&&(t.update(e.pools[i].digest().getBytes()),e.pools[i].start()),r<<=1;e.keyBytes=t.digest().getBytes(),t.start(),t.update(e.keyBytes);var n=t.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(n),e.generated=0}function u(t){var e=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(e=function(t){return i.getRandomValues(t)});var a=n.util.createBuffer();if(e)for(;a.length()<t;){var s=Math.max(1,Math.min(t-a.length(),65536)/4),o=new Uint32Array(Math.floor(s));try{e(o);for(var h=0;h<o.length;++h)a.putInt32(o[h])}catch(t){if(!("undefined"!=typeof QuotaExceededError&&t instanceof QuotaExceededError))throw t}}if(a.length()<t)for(var u,f,l,c=Math.floor(65536*Math.random());a.length()<t;)for(f=16807*(65535&c),f+=(32767&(u=16807*(c>>16)))<<16,c=4294967295&(f=(2147483647&(f+=u>>15))+(f>>31)),h=0;h<3;++h)l=c>>>(h<<3),l^=Math.floor(256*Math.random()),a.putByte(255&l);return a.getBytes(t)}return e.pools=i,e.pool=0,e.generate=function(t,r){if(!r)return e.generateSync(t);var i=e.plugin.cipher,a=e.plugin.increment,s=e.plugin.formatKey,o=e.plugin.formatSeed,u=n.util.createBuffer();e.key=null,function f(l){if(l)return r(l);if(u.length()>=t)return r(null,u.getBytes(t));if(e.generated>1048575&&(e.key=null),null===e.key)return n.util.nextTick((function(){!function(t){if(e.pools[0].messageLength>=32)return h(),t();var r=32-e.pools[0].messageLength<<5;e.seedFile(r,(function(r,i){if(r)return t(r);e.collect(i),h(),t()}))}(f)}));var c=i(e.key,e.seed);e.generated+=c.length,u.putBytes(c),e.key=s(i(e.key,a(e.seed))),e.seed=o(i(e.key,e.seed)),n.util.setImmediate(f)}()},e.generateSync=function(t){var r=e.plugin.cipher,i=e.plugin.increment,a=e.plugin.formatKey,s=e.plugin.formatSeed;e.key=null;for(var h=n.util.createBuffer();h.length()<t;){e.generated>1048575&&(e.key=null),null===e.key&&o();var u=r(e.key,e.seed);e.generated+=u.length,h.putBytes(u),e.key=a(r(e.key,i(e.seed))),e.seed=s(r(e.key,e.seed))}return h.getBytes(t)},a?(e.seedFile=function(t,e){a.randomBytes(t,(function(t,r){if(t)return e(t);e(null,r.toString())}))},e.seedFileSync=function(t){return a.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,u(t))}catch(t){e(t)}},e.seedFileSync=u),e.collect=function(t){for(var r=t.length,i=0;i<r;++i)e.pools[e.pool].update(t.substr(i,1)),e.pool=31===e.pool?0:e.pool+1},e.collectInt=function(t,r){for(var i="",n=0;n<r;n+=8)i+=String.fromCharCode(t>>n&255);e.collect(i)},e.registerWorker=function(t){t===self?e.seedFile=function(t,e){self.addEventListener("message",(function t(r){var i=r.data;i.forge&&i.forge.prng&&(self.removeEventListener("message",t),e(i.forge.prng.err,i.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:t}}})}:t.addEventListener("message",(function(r){var i=r.data;i.forge&&i.forge.prng&&e.seedFile(i.forge.prng.needed,(function(e,r){t.postMessage({forge:{prng:{err:e,bytes:r}}})}))}))},e}},3900:(t,e,r)=>{var i=r(276);r(7619),t.exports=i.cipher=i.cipher||{},i.cipher.algorithms=i.cipher.algorithms||{},i.cipher.createCipher=function(t,e){var r=t;if("string"==typeof r&&(r=i.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new i.cipher.BlockCipher({algorithm:r,key:e,decrypt:!1})},i.cipher.createDecipher=function(t,e){var r=t;if("string"==typeof r&&(r=i.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new i.cipher.BlockCipher({algorithm:r,key:e,decrypt:!0})},i.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),i.cipher.algorithms[t]=e},i.cipher.getAlgorithm=function(t){return(t=t.toUpperCase())in i.cipher.algorithms?i.cipher.algorithms[t]:null};var n=i.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};n.prototype.start=function(t){t=t||{};var e={};for(var r in t)e[r]=t[r];e.decrypt=this._decrypt,this._finish=!1,this._input=i.util.createBuffer(),this.output=t.output||i.util.createBuffer(),this.mode.start(e)},n.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},n.prototype.finish=function(t){!t||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(e){return t(this.blockSize,e,!1)},this.mode.unpad=function(e){return t(this.blockSize,e,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e)))}},3917:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=r(6225),s=i.rotl32,o=i.sum32,h=i.sum32_5,u=a.ft_1,f=n.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function c(){if(!(this instanceof c))return new c;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(c,f),t.exports=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],a=this.h[1],f=this.h[2],c=this.h[3],d=this.h[4];for(i=0;i<r.length;i++){var p=~~(i/20),m=h(s(n,5),u(p,a,f,c),d,r[i],l[p]);d=c,c=f,f=s(a,30),a=n,n=m}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],f),this.h[3]=o(this.h[3],c),this.h[4]=o(this.h[4],d)},c.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},3986:(t,e,r)=>{var i=r(276);r(2746),r(1696),r(1267),r(2385),r(9255),r(9356),r(1598),r(7619);var n=function(t,e,r,n){var a=i.util.createBuffer(),s=t.length>>1,o=s+(1&t.length),h=t.substr(0,o),u=t.substr(s,o),f=i.util.createBuffer(),l=i.hmac.create();r=e+r;var c=Math.ceil(n/16),d=Math.ceil(n/20);l.start("MD5",h);var p=i.util.createBuffer();f.putBytes(r);for(var m=0;m<c;++m)l.start(null,null),l.update(f.getBytes()),f.putBuffer(l.digest()),l.start(null,null),l.update(f.bytes()+r),p.putBuffer(l.digest());l.start("SHA1",u);var g=i.util.createBuffer();for(f.clear(),f.putBytes(r),m=0;m<d;++m)l.start(null,null),l.update(f.getBytes()),f.putBuffer(l.digest()),l.start(null,null),l.update(f.bytes()+r),g.putBuffer(l.digest());return a.putBytes(i.util.xorBytes(p.getBytes(),g.getBytes(),n)),a},a=function(t,e,r){var n=!1;try{var a=t.deflate(e.fragment.getBytes());e.fragment=i.util.createBuffer(a),e.length=a.length,n=!0}catch(t){}return n},s=function(t,e,r){var n=!1;try{var a=t.inflate(e.fragment.getBytes());e.fragment=i.util.createBuffer(a),e.length=a.length,n=!0}catch(t){}return n},o=function(t,e){var r=0;switch(e){case 1:r=t.getByte();break;case 2:r=t.getInt16();break;case 3:r=t.getInt24();break;case 4:r=t.getInt32()}return i.util.createBuffer(t.getBytes(r))},h=function(t,e,r){t.putInt(r.length(),e<<3),t.putBuffer(r)},u={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}}};u.SupportedVersions=[u.Versions.TLS_1_1,u.Versions.TLS_1_0],u.Version=u.SupportedVersions[0],u.MaxFragment=15360,u.ConnectionEnd={server:0,client:1},u.PRFAlgorithm={tls_prf_sha256:0},u.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},u.CipherType={stream:0,block:1,aead:2},u.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},u.CompressionMethod={none:0,deflate:1},u.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},u.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},u.Alert={},u.Alert.Level={warning:1,fatal:2},u.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},u.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},u.CipherSuites={},u.getCipherSuite=function(t){var e=null;for(var r in u.CipherSuites){var i=u.CipherSuites[r];if(i.id[0]===t.charCodeAt(0)&&i.id[1]===t.charCodeAt(1)){e=i;break}}return e},u.handleUnexpected=function(t,e){!t.open&&t.entity===u.ConnectionEnd.client||t.error(t,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unexpected_message}})},u.handleHelloRequest=function(t,e,r){!t.handshaking&&t.handshakes>0&&(u.queue(t,u.createAlert(t,{level:u.Alert.Level.warning,description:u.Alert.Description.no_renegotiation})),u.flush(t)),t.process()},u.parseHelloMessage=function(t,e,r){var n=null,a=t.entity===u.ConnectionEnd.client;if(r<38)t.error(t,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});else{var s=e.fragment,h=s.length();if(n={version:{major:s.getByte(),minor:s.getByte()},random:i.util.createBuffer(s.getBytes(32)),session_id:o(s,1),extensions:[]},a?(n.cipher_suite=s.getBytes(2),n.compression_method=s.getByte()):(n.cipher_suites=o(s,2),n.compression_methods=o(s,1)),(h=r-(h-s.length()))>0){for(var f=o(s,2);f.length()>0;)n.extensions.push({type:[f.getByte(),f.getByte()],data:o(f,2)});if(!a)for(var l=0;l<n.extensions.length;++l){var c=n.extensions[l];if(0===c.type[0]&&0===c.type[1])for(var d=o(c.data,2);d.length()>0&&0===d.getByte();)t.session.extensions.server_name.serverNameList.push(o(d,2).getBytes())}}if(t.session.version&&(n.version.major!==t.session.version.major||n.version.minor!==t.session.version.minor))return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});if(a)t.session.cipherSuite=u.getCipherSuite(n.cipher_suite);else for(var p=i.util.createBuffer(n.cipher_suites.bytes());p.length()>0&&(t.session.cipherSuite=u.getCipherSuite(p.getBytes(2)),null===t.session.cipherSuite););if(null===t.session.cipherSuite)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure},cipherSuite:i.util.bytesToHex(n.cipher_suite)});t.session.compressionMethod=a?n.compression_method:u.CompressionMethod.none}return n},u.createSecurityParameters=function(t,e){var r=t.entity===u.ConnectionEnd.client,i=e.random.bytes(),n=r?t.session.sp.client_random:i,a=r?i:u.createRandom().getBytes();t.session.sp={entity:t.entity,prf_algorithm:u.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:t.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:n,server_random:a}},u.handleServerHello=function(t,e,r){var i=u.parseHelloMessage(t,e,r);if(!t.fail){if(!(i.version.minor<=t.version.minor))return t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});t.version.minor=i.version.minor,t.session.version=t.version;var n=i.session_id.bytes();n.length>0&&n===t.session.id?(t.expect=p,t.session.resuming=!0,t.session.sp.server_random=i.random.bytes()):(t.expect=f,t.session.resuming=!1,u.createSecurityParameters(t,i)),t.session.id=n,t.process()}},u.handleClientHello=function(t,e,r){var n=u.parseHelloMessage(t,e,r);if(!t.fail){var a=n.session_id.bytes(),s=null;if(t.sessionCache&&(null===(s=t.sessionCache.getSession(a))?a="":(s.version.major!==n.version.major||s.version.minor>n.version.minor)&&(s=null,a="")),0===a.length&&(a=i.random.getBytes(32)),t.session.id=a,t.session.clientHelloVersion=n.version,t.session.sp={},s)t.version=t.session.version=s.version,t.session.sp=s.sp;else{for(var o,h=1;h<u.SupportedVersions.length&&!((o=u.SupportedVersions[h]).minor<=n.version.minor);++h);t.version={major:o.major,minor:o.minor},t.session.version=t.version}null!==s?(t.expect=M,t.session.resuming=!0,t.session.sp.client_random=n.random.bytes()):(t.expect=!1!==t.verifyClient?v:b,t.session.resuming=!1,u.createSecurityParameters(t,n)),t.open=!0,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createServerHello(t)})),t.session.resuming?(u.queue(t,u.createRecord(t,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),t.state.pending=u.createConnectionState(t),t.state.current.write=t.state.pending.write,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createFinished(t)}))):(u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificate(t)})),t.fail||(u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createServerKeyExchange(t)})),!1!==t.verifyClient&&u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificateRequest(t)})),u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createServerHelloDone(t)})))),u.flush(t),t.process()}},u.handleCertificate=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var n,a,s=e.fragment,h={certificate_list:o(s,3)},f=[];try{for(;h.certificate_list.length()>0;)n=o(h.certificate_list,3),a=i.asn1.fromDer(n),n=i.pki.certificateFromAsn1(a,!0),f.push(n)}catch(e){return t.error(t,{message:"Could not parse certificate list.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var c=t.entity===u.ConnectionEnd.client;!c&&!0!==t.verifyClient||0!==f.length?0===f.length?t.expect=c?l:b:(c?t.session.serverCertificate=f[0]:t.session.clientCertificate=f[0],u.verifyCertificateChain(t,f)&&(t.expect=c?l:b)):t.error(t,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}}),t.process()},u.handleServerKeyExchange=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});t.expect=c,t.process()},u.handleClientKeyExchange=function(t,e,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});var n=e.fragment,a={enc_pre_master_secret:o(n,2).getBytes()},s=null;if(t.getPrivateKey)try{s=t.getPrivateKey(t,t.session.serverCertificate),s=i.pki.privateKeyFromPem(s)}catch(e){t.error(t,{message:"Could not get private key.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}if(null===s)return t.error(t,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}});try{var h=t.session.sp;h.pre_master_secret=s.decrypt(a.enc_pre_master_secret);var f=t.session.clientHelloVersion;if(f.major!==h.pre_master_secret.charCodeAt(0)||f.minor!==h.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(t){h.pre_master_secret=i.random.getBytes(48)}t.expect=M,null!==t.session.clientCertificate&&(t.expect=w),t.process()},u.handleCertificateRequest=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var i=e.fragment,n={certificate_types:o(i,1),certificate_authorities:o(i,2)};t.session.certificateRequest=n,t.expect=d,t.process()},u.handleCertificateVerify=function(t,e,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var a=n.bytes();n.read+=4;var s={signature:o(n,2).getBytes()},h=i.util.createBuffer();h.putBuffer(t.session.md5.digest()),h.putBuffer(t.session.sha1.digest()),h=h.getBytes();try{if(!t.session.clientCertificate.publicKey.verify(h,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(a),t.session.sha1.update(a)}catch(e){return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure}})}t.expect=M,t.process()},u.handleServerHelloDone=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.record_overflow}});if(null===t.serverCertificate){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.insufficient_security}},a=t.verify(t,n.alert.description,0,[]);if(!0!==a)return(a||0===a)&&("object"!=typeof a||i.util.isArray(a)?"number"==typeof a&&(n.alert.description=a):(a.message&&(n.message=a.message),a.alert&&(n.alert.description=a.alert))),t.error(t,n)}null!==t.session.certificateRequest&&(e=u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificate(t)}),u.queue(t,e)),e=u.createRecord(t,{type:u.ContentType.handshake,data:u.createClientKeyExchange(t)}),u.queue(t,e),t.expect=y;var s=function(t,e){null!==t.session.certificateRequest&&null!==t.session.clientCertificate&&u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificateVerify(t,e)})),u.queue(t,u.createRecord(t,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),t.state.pending=u.createConnectionState(t),t.state.current.write=t.state.pending.write,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createFinished(t)})),t.expect=p,u.flush(t),t.process()};if(null===t.session.certificateRequest||null===t.session.clientCertificate)return s(t,null);u.getClientSignature(t,s)},u.handleChangeCipherSpec=function(t,e){if(1!==e.fragment.getByte())return t.error(t,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var r=t.entity===u.ConnectionEnd.client;(t.session.resuming&&r||!t.session.resuming&&!r)&&(t.state.pending=u.createConnectionState(t)),t.state.current.read=t.state.pending.read,(!t.session.resuming&&r||t.session.resuming&&!r)&&(t.state.pending=null),t.expect=r?m:_,t.process()},u.handleFinished=function(t,e,r){var a=e.fragment;a.read-=4;var s=a.bytes();a.read+=4;var o=e.fragment.getBytes();(a=i.util.createBuffer()).putBuffer(t.session.md5.digest()),a.putBuffer(t.session.sha1.digest());var h=t.entity===u.ConnectionEnd.client,f=h?"server finished":"client finished",l=t.session.sp;if((a=n(l.master_secret,f,a.getBytes(),12)).getBytes()!==o)return t.error(t,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decrypt_error}});t.session.md5.update(s),t.session.sha1.update(s),(t.session.resuming&&h||!t.session.resuming&&!h)&&(u.queue(t,u.createRecord(t,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),t.state.current.write=t.state.pending.write,t.state.pending=null,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createFinished(t)}))),t.expect=h?g:S,t.handshaking=!1,++t.handshakes,t.peerCertificate=h?t.session.serverCertificate:t.session.clientCertificate,u.flush(t),t.isConnected=!0,t.connected(t),t.process()},u.handleAlert=function(t,e){var r,i=e.fragment,n={level:i.getByte(),description:i.getByte()};switch(n.description){case u.Alert.Description.close_notify:r="Connection closed.";break;case u.Alert.Description.unexpected_message:r="Unexpected message.";break;case u.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case u.Alert.Description.decryption_failed:r="Decryption failed.";break;case u.Alert.Description.record_overflow:r="Record overflow.";break;case u.Alert.Description.decompression_failure:r="Decompression failed.";break;case u.Alert.Description.handshake_failure:r="Handshake failure.";break;case u.Alert.Description.bad_certificate:r="Bad certificate.";break;case u.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case u.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case u.Alert.Description.certificate_expired:r="Certificate expired.";break;case u.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case u.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case u.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case u.Alert.Description.access_denied:r="Access denied.";break;case u.Alert.Description.decode_error:r="Decode error.";break;case u.Alert.Description.decrypt_error:r="Decrypt error.";break;case u.Alert.Description.export_restriction:r="Export restriction.";break;case u.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case u.Alert.Description.insufficient_security:r="Insufficient security.";break;case u.Alert.Description.internal_error:r="Internal error.";break;case u.Alert.Description.user_canceled:r="User canceled.";break;case u.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(n.description===u.Alert.Description.close_notify)return t.close();t.error(t,{message:r,send:!1,origin:t.entity===u.ConnectionEnd.client?"server":"client",alert:n}),t.process()},u.handleHandshake=function(t,e){var r=e.fragment,n=r.getByte(),a=r.getInt24();if(a>r.length())return t.fragmented=e,e.fragment=i.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var s=r.bytes(a+4);r.read+=4,n in O[t.entity][t.expect]?(t.entity!==u.ConnectionEnd.server||t.open||t.fail||(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:i.md.md5.create(),sha1:i.md.sha1.create()}),n!==u.HandshakeType.hello_request&&n!==u.HandshakeType.certificate_verify&&n!==u.HandshakeType.finished&&(t.session.md5.update(s),t.session.sha1.update(s)),O[t.entity][t.expect][n](t,e,a)):u.handleUnexpected(t,e)},u.handleApplicationData=function(t,e){t.data.putBuffer(e.fragment),t.dataReady(t),t.process()},u.handleHeartbeat=function(t,e){var r=e.fragment,n=r.getByte(),a=r.getInt16(),s=r.getBytes(a);if(n===u.HeartbeatMessageType.heartbeat_request){if(t.handshaking||a>s.length)return t.process();u.queue(t,u.createRecord(t,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_response,s)})),u.flush(t)}else if(n===u.HeartbeatMessageType.heartbeat_response){if(s!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,i.util.createBuffer(s))}t.process()};var f=1,l=2,c=3,d=4,p=5,m=6,g=7,y=8,v=1,b=2,w=3,M=4,_=5,S=6,E=u.handleUnexpected,C=u.handleChangeCipherSpec,A=u.handleAlert,T=u.handleHandshake,B=u.handleApplicationData,I=u.handleHeartbeat,k=[];k[u.ConnectionEnd.client]=[[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[C,A,E,E,I],[E,A,T,E,I],[E,A,T,B,I],[E,A,T,E,I]],k[u.ConnectionEnd.server]=[[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[C,A,E,E,I],[E,A,T,E,I],[E,A,T,B,I],[E,A,T,E,I]];var R=u.handleHelloRequest,N=u.handleServerHello,L=u.handleCertificate,x=u.handleServerKeyExchange,U=u.handleCertificateRequest,D=u.handleServerHelloDone,P=u.handleFinished,O=[];O[u.ConnectionEnd.client]=[[E,E,N,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,L,x,U,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,x,U,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,U,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,D,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,P],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]];var K=u.handleClientHello,j=u.handleClientKeyExchange,q=u.handleCertificateVerify;O[u.ConnectionEnd.server]=[[E,K,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,L,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,j,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,q,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,P],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]],u.generateKeys=function(t,e){var r=n,i=e.client_random+e.server_random;t.session.resuming||(e.master_secret=r(e.pre_master_secret,"master secret",i,48).bytes(),e.pre_master_secret=null),i=e.server_random+e.client_random;var a=2*e.mac_key_length+2*e.enc_key_length,s=t.version.major===u.Versions.TLS_1_0.major&&t.version.minor===u.Versions.TLS_1_0.minor;s&&(a+=2*e.fixed_iv_length);var o=r(e.master_secret,"key expansion",i,a),h={client_write_MAC_key:o.getBytes(e.mac_key_length),server_write_MAC_key:o.getBytes(e.mac_key_length),client_write_key:o.getBytes(e.enc_key_length),server_write_key:o.getBytes(e.enc_key_length)};return s&&(h.client_write_IV=o.getBytes(e.fixed_iv_length),h.server_write_IV=o.getBytes(e.fixed_iv_length)),h},u.createConnectionState=function(t){var e=t.entity===u.ConnectionEnd.client,r=function(){var t={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(t){return!0},compressionState:null,compressFunction:function(t){return!0},updateSequenceNumber:function(){4294967295===t.sequenceNumber[1]?(t.sequenceNumber[1]=0,++t.sequenceNumber[0]):++t.sequenceNumber[1]}};return t},i={read:r(),write:r()};if(i.read.update=function(t,e){return i.read.cipherFunction(e,i.read)?i.read.compressFunction(t,e,i.read)||t.error(t,{message:"Could not decompress record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decompression_failure}}):t.error(t,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_record_mac}}),!t.fail},i.write.update=function(t,e){return i.write.compressFunction(t,e,i.write)?i.write.cipherFunction(e,i.write)||t.error(t,{message:"Could not encrypt record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):t.error(t,{message:"Could not compress record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}),!t.fail},t.session){var n=t.session.sp;switch(t.session.cipherSuite.initSecurityParameters(n),n.keys=u.generateKeys(t,n),i.read.macKey=e?n.keys.server_write_MAC_key:n.keys.client_write_MAC_key,i.write.macKey=e?n.keys.client_write_MAC_key:n.keys.server_write_MAC_key,t.session.cipherSuite.initConnectionState(i,t,n),n.compression_algorithm){case u.CompressionMethod.none:break;case u.CompressionMethod.deflate:i.read.compressFunction=s,i.write.compressFunction=a;break;default:throw new Error("Unsupported compression algorithm.")}}return i},u.createRandom=function(){var t=new Date,e=+t+6e4*t.getTimezoneOffset(),r=i.util.createBuffer();return r.putInt32(e),r.putBytes(i.random.getBytes(28)),r},u.createRecord=function(t,e){return e.data?{type:e.type,version:{major:t.version.major,minor:t.version.minor},length:e.data.length(),fragment:e.data}:null},u.createAlert=function(t,e){var r=i.util.createBuffer();return r.putByte(e.level),r.putByte(e.description),u.createRecord(t,{type:u.ContentType.alert,data:r})},u.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};for(var e=i.util.createBuffer(),r=0;r<t.cipherSuites.length;++r){var n=t.cipherSuites[r];e.putByte(n.id[0]),e.putByte(n.id[1])}var a=e.length(),s=i.util.createBuffer();s.putByte(u.CompressionMethod.none);var o=s.length(),f=i.util.createBuffer();if(t.virtualHost){var l=i.util.createBuffer();l.putByte(0),l.putByte(0);var c=i.util.createBuffer();c.putByte(0),h(c,2,i.util.createBuffer(t.virtualHost));var d=i.util.createBuffer();h(d,2,c),h(l,2,d),f.putBuffer(l)}var p=f.length();p>0&&(p+=2);var m=t.session.id,g=m.length+1+2+4+28+2+a+1+o+p,y=i.util.createBuffer();return y.putByte(u.HandshakeType.client_hello),y.putInt24(g),y.putByte(t.version.major),y.putByte(t.version.minor),y.putBytes(t.session.sp.client_random),h(y,1,i.util.createBuffer(m)),h(y,2,e),h(y,1,s),p>0&&h(y,2,f),y},u.createServerHello=function(t){var e=t.session.id,r=e.length+1+2+4+28+2+1,n=i.util.createBuffer();return n.putByte(u.HandshakeType.server_hello),n.putInt24(r),n.putByte(t.version.major),n.putByte(t.version.minor),n.putBytes(t.session.sp.server_random),h(n,1,i.util.createBuffer(e)),n.putByte(t.session.cipherSuite.id[0]),n.putByte(t.session.cipherSuite.id[1]),n.putByte(t.session.compressionMethod),n},u.createCertificate=function(t){var e,r=t.entity===u.ConnectionEnd.client,n=null;t.getCertificate&&(e=r?t.session.certificateRequest:t.session.extensions.server_name.serverNameList,n=t.getCertificate(t,e));var a=i.util.createBuffer();if(null!==n)try{i.util.isArray(n)||(n=[n]);for(var s=null,o=0;o<n.length;++o){var f=i.pem.decode(n[o])[0];if("CERTIFICATE"!==f.type&&"X509 CERTIFICATE"!==f.type&&"TRUSTED CERTIFICATE"!==f.type){var l=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw l.headerType=f.type,l}if(f.procType&&"ENCRYPTED"===f.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var c=i.util.createBuffer(f.body);null===s&&(s=i.asn1.fromDer(c.bytes(),!1));var d=i.util.createBuffer();h(d,3,c),a.putBuffer(d)}n=i.pki.certificateFromAsn1(s),r?t.session.clientCertificate=n:t.session.serverCertificate=n}catch(e){return t.error(t,{message:"Could not send certificate list.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var p=3+a.length(),m=i.util.createBuffer();return m.putByte(u.HandshakeType.certificate),m.putInt24(p),h(m,3,a),m},u.createClientKeyExchange=function(t){var e=i.util.createBuffer();e.putByte(t.session.clientHelloVersion.major),e.putByte(t.session.clientHelloVersion.minor),e.putBytes(i.random.getBytes(46));var r=t.session.sp;r.pre_master_secret=e.getBytes();var n=(e=t.session.serverCertificate.publicKey.encrypt(r.pre_master_secret)).length+2,a=i.util.createBuffer();return a.putByte(u.HandshakeType.client_key_exchange),a.putInt24(n),a.putInt16(e.length),a.putBytes(e),a},u.createServerKeyExchange=function(t){return i.util.createBuffer()},u.getClientSignature=function(t,e){var r=i.util.createBuffer();r.putBuffer(t.session.md5.digest()),r.putBuffer(t.session.sha1.digest()),r=r.getBytes(),t.getSignature=t.getSignature||function(t,e,r){var n=null;if(t.getPrivateKey)try{n=t.getPrivateKey(t,t.session.clientCertificate),n=i.pki.privateKeyFromPem(n)}catch(e){t.error(t,{message:"Could not get private key.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}null===n?t.error(t,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):e=n.sign(e,null),r(t,e)},t.getSignature(t,r,e)},u.createCertificateVerify=function(t,e){var r=e.length+2,n=i.util.createBuffer();return n.putByte(u.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(e.length),n.putBytes(e),n},u.createCertificateRequest=function(t){var e=i.util.createBuffer();e.putByte(1);var r=i.util.createBuffer();for(var n in t.caStore.certs){var a=t.caStore.certs[n],s=i.pki.distinguishedNameToAsn1(a.subject),o=i.asn1.toDer(s);r.putInt16(o.length()),r.putBuffer(o)}var f=1+e.length()+2+r.length(),l=i.util.createBuffer();return l.putByte(u.HandshakeType.certificate_request),l.putInt24(f),h(l,1,e),h(l,2,r),l},u.createServerHelloDone=function(t){var e=i.util.createBuffer();return e.putByte(u.HandshakeType.server_hello_done),e.putInt24(0),e},u.createChangeCipherSpec=function(){var t=i.util.createBuffer();return t.putByte(1),t},u.createFinished=function(t){var e=i.util.createBuffer();e.putBuffer(t.session.md5.digest()),e.putBuffer(t.session.sha1.digest());var r=t.entity===u.ConnectionEnd.client,a=t.session.sp,s=r?"client finished":"server finished";e=n(a.master_secret,s,e.getBytes(),12);var o=i.util.createBuffer();return o.putByte(u.HandshakeType.finished),o.putInt24(e.length()),o.putBuffer(e),o},u.createHeartbeat=function(t,e,r){void 0===r&&(r=e.length);var n=i.util.createBuffer();n.putByte(t),n.putInt16(r),n.putBytes(e);var a=n.length(),s=Math.max(16,a-r-3);return n.putBytes(i.random.getBytes(s)),n},u.queue=function(t,e){if(e&&(0!==e.fragment.length()||e.type!==u.ContentType.handshake&&e.type!==u.ContentType.alert&&e.type!==u.ContentType.change_cipher_spec)){if(e.type===u.ContentType.handshake){var r=e.fragment.bytes();t.session.md5.update(r),t.session.sha1.update(r),r=null}var n;if(e.fragment.length()<=u.MaxFragment)n=[e];else{n=[];for(var a=e.fragment.bytes();a.length>u.MaxFragment;)n.push(u.createRecord(t,{type:e.type,data:i.util.createBuffer(a.slice(0,u.MaxFragment))})),a=a.slice(u.MaxFragment);a.length>0&&n.push(u.createRecord(t,{type:e.type,data:i.util.createBuffer(a)}))}for(var s=0;s<n.length&&!t.fail;++s){var o=n[s];t.state.current.write.update(t,o)&&t.records.push(o)}}},u.flush=function(t){for(var e=0;e<t.records.length;++e){var r=t.records[e];t.tlsData.putByte(r.type),t.tlsData.putByte(r.version.major),t.tlsData.putByte(r.version.minor),t.tlsData.putInt16(r.fragment.length()),t.tlsData.putBuffer(t.records[e].fragment)}return t.records=[],t.tlsDataReady(t)};var V=function(t){switch(t){case!0:return!0;case i.pki.certificateError.bad_certificate:return u.Alert.Description.bad_certificate;case i.pki.certificateError.unsupported_certificate:return u.Alert.Description.unsupported_certificate;case i.pki.certificateError.certificate_revoked:return u.Alert.Description.certificate_revoked;case i.pki.certificateError.certificate_expired:return u.Alert.Description.certificate_expired;case i.pki.certificateError.certificate_unknown:return u.Alert.Description.certificate_unknown;case i.pki.certificateError.unknown_ca:return u.Alert.Description.unknown_ca;default:return u.Alert.Description.bad_certificate}};for(var F in u.verifyCertificateChain=function(t,e){try{var r={};for(var n in t.verifyOptions)r[n]=t.verifyOptions[n];r.verify=function(e,r,n){V(e);var a=t.verify(t,e,r,n);if(!0!==a){if("object"==typeof a&&!i.util.isArray(a)){var s=new Error("The application rejected the certificate.");throw s.send=!0,s.alert={level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate},a.message&&(s.message=a.message),a.alert&&(s.alert.description=a.alert),s}a!==e&&(a=function(t){switch(t){case!0:return!0;case u.Alert.Description.bad_certificate:return i.pki.certificateError.bad_certificate;case u.Alert.Description.unsupported_certificate:return i.pki.certificateError.unsupported_certificate;case u.Alert.Description.certificate_revoked:return i.pki.certificateError.certificate_revoked;case u.Alert.Description.certificate_expired:return i.pki.certificateError.certificate_expired;case u.Alert.Description.certificate_unknown:return i.pki.certificateError.certificate_unknown;case u.Alert.Description.unknown_ca:return i.pki.certificateError.unknown_ca;default:return i.pki.certificateError.bad_certificate}}(a))}return a},i.pki.verifyCertificateChain(t.caStore,e,r)}catch(e){var a=e;("object"!=typeof a||i.util.isArray(a))&&(a={send:!0,alert:{level:u.Alert.Level.fatal,description:V(e)}}),"send"in a||(a.send=!0),"alert"in a||(a.alert={level:u.Alert.Level.fatal,description:V(a.error)}),t.error(t,a)}return!t.fail},u.createSessionCache=function(t,e){var r=null;if(t&&t.getSession&&t.setSession&&t.order)r=t;else{for(var n in(r={}).cache=t||{},r.capacity=Math.max(e||100,1),r.order=[],t)r.order.length<=e?r.order.push(n):delete t[n];r.getSession=function(t){var e=null,n=null;if(t?n=i.util.bytesToHex(t):r.order.length>0&&(n=r.order[0]),null!==n&&n in r.cache)for(var a in e=r.cache[n],delete r.cache[n],r.order)if(r.order[a]===n){r.order.splice(a,1);break}return e},r.setSession=function(t,e){if(r.order.length===r.capacity){var n=r.order.shift();delete r.cache[n]}n=i.util.bytesToHex(t),r.order.push(n),r.cache[n]=e}}return r},u.createConnection=function(t){var e;e=t.caStore?i.util.isArray(t.caStore)?i.pki.createCaStore(t.caStore):t.caStore:i.pki.createCaStore();var r=t.cipherSuites||null;if(null===r)for(var n in r=[],u.CipherSuites)r.push(u.CipherSuites[n]);var a=t.server?u.ConnectionEnd.server:u.ConnectionEnd.client,s=t.sessionCache?u.createSessionCache(t.sessionCache):null,o={version:{major:u.Version.major,minor:u.Version.minor},entity:a,sessionId:t.sessionId,caStore:e,sessionCache:s,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(t,e,r,i){return e},verifyOptions:t.verifyOptions||{},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:i.util.createBuffer(),tlsData:i.util.createBuffer(),data:i.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:function(e,r){r.origin=r.origin||(e.entity===u.ConnectionEnd.client?"client":"server"),r.send&&(u.queue(e,u.createAlert(e,r.alert)),u.flush(e));var i=!1!==r.fatal;i&&(e.fail=!0),t.error(e,r),i&&e.close(!1)},deflate:t.deflate||null,inflate:t.inflate||null,reset:function(t){o.version={major:u.Version.major,minor:u.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=(o.entity,u.ConnectionEnd.client,0),o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(t||void 0===t),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=u.createConnectionState(o)}};return o.reset(),o.handshake=function(t){if(o.entity!==u.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&0===o.handshakes&&(o.fail=!1),o.handshaking=!0;var e=null;(t=t||"").length>0&&(o.sessionCache&&(e=o.sessionCache.getSession(t)),null===e&&(t="")),0===t.length&&o.sessionCache&&null!==(e=o.sessionCache.getSession())&&(t=e.id),o.session={id:t,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:i.md.md5.create(),sha1:i.md.sha1.create()},e&&(o.version=e.version,o.session.sp=e.sp),o.session.sp.client_random=u.createRandom().getBytes(),o.open=!0,u.queue(o,u.createRecord(o,{type:u.ContentType.handshake,data:u.createClientHello(o)})),u.flush(o)}},o.process=function(t){var e=0;return t&&o.input.putBytes(t),o.fail||(null!==o.record&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),null===o.record&&(e=function(t){var e=0,r=t.input,n=r.length();if(n<5)e=5-n;else{t.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:i.util.createBuffer(),ready:!1};var a=t.record.version.major===t.version.major;a&&t.session&&t.session.version&&(a=t.record.version.minor===t.version.minor),a||t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}})}return e}(o)),o.fail||null===o.record||o.record.ready||(e=function(t){var e=0,r=t.input,i=r.length();return i<t.record.length?e=t.record.length-i:(t.record.fragment.putBytes(r.getBytes(t.record.length)),r.compact(),t.state.current.read.update(t,t.record)&&(null!==t.fragmented&&(t.fragmented.type===t.record.type?(t.fragmented.fragment.putBuffer(t.record.fragment),t.record=t.fragmented):t.error(t,{message:"Invalid fragmented record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unexpected_message}})),t.record.ready=!0)),e}(o)),!o.fail&&null!==o.record&&o.record.ready&&function(t,e){var r=e.type-u.ContentType.change_cipher_spec,i=k[t.entity][t.expect];r in i?i[r](t,e):u.handleUnexpected(t,e)}(o,o.record)),e},o.prepare=function(t){return u.queue(o,u.createRecord(o,{type:u.ContentType.application_data,data:i.util.createBuffer(t)})),u.flush(o)},o.prepareHeartbeatRequest=function(t,e){return t instanceof i.util.ByteBuffer&&(t=t.bytes()),void 0===e&&(e=t.length),o.expectedHeartbeatPayload=t,u.queue(o,u.createRecord(o,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_request,t,e)})),u.flush(o)},o.close=function(t){if(!o.fail&&o.sessionCache&&o.session){var e={id:o.session.id,version:o.session.version,sp:o.session.sp};e.sp.keys=null,o.sessionCache.setSession(e.id,e)}o.open&&(o.open=!1,o.input.clear(),(o.isConnected||o.handshaking)&&(o.isConnected=o.handshaking=!1,u.queue(o,u.createAlert(o,{level:u.Alert.Level.warning,description:u.Alert.Description.close_notify})),u.flush(o)),o.closed(o)),o.reset(t)},o},t.exports=i.tls=i.tls||{},u)"function"!=typeof u[F]&&(i.tls[F]=u[F]);i.tls.prf_tls1=n,i.tls.hmac_sha1=function(t,e,r){var n=i.hmac.create();n.start("SHA1",t);var a=i.util.createBuffer();return a.putInt32(e[0]),a.putInt32(e[1]),a.putByte(r.type),a.putByte(r.version.major),a.putByte(r.version.minor),a.putInt16(r.length),a.putBytes(r.fragment.bytes()),n.update(a.getBytes()),n.digest().getBytes()},i.tls.createSessionCache=u.createSessionCache,i.tls.createConnection=u.createConnection},4011:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},4050:(t,e,r)=>{var i=r(6168),n=r(9560),a=r(6698),s=r(2861).Buffer,o={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function h(t){i.call(this);var e,r=t.mode.toLowerCase(),n=o[r];e=t.decrypt?"decrypt":"encrypt";var a=t.key;s.isBuffer(a)||(a=s.from(a)),"des-ede"!==r&&"des-ede-cbc"!==r||(a=s.concat([a,a.slice(0,8)]));var h=t.iv;s.isBuffer(h)||(h=s.from(h)),this._des=n.create({key:a,iv:h,type:e})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],t.exports=h,a(h,i),h.prototype._update=function(t){return s.from(this._des.update(t))},h.prototype._final=function(){return s.from(this._des.final())}},4058:(t,e,r)=>{var i=r(8287).Buffer,n={};t.exports=n;var a={};n.encode=function(t,e,r){if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var i="";if(t instanceof Uint8Array){var n=0,a=e.length,s=e.charAt(0),o=[0];for(n=0;n<t.length;++n){for(var h=0,u=t[n];h<o.length;++h)u+=o[h]<<8,o[h]=u%a,u=u/a|0;for(;u>0;)o.push(u%a),u=u/a|0}for(n=0;0===t[n]&&n<t.length-1;++n)i+=s;for(n=o.length-1;n>=0;--n)i+=e[o[n]]}else i=function(t,e){var r=0,i=e.length,n=e.charAt(0),a=[0];for(r=0;r<t.length();++r){for(var s=0,o=t.at(r);s<a.length;++s)o+=a[s]<<8,a[s]=o%i,o=o/i|0;for(;o>0;)a.push(o%i),o=o/i|0}var h="";for(r=0;0===t.at(r)&&r<t.length()-1;++r)h+=n;for(r=a.length-1;r>=0;--r)h+=e[a[r]];return h}(t,e);if(r){var f=new RegExp(".{1,"+r+"}","g");i=i.match(f).join("\r\n")}return i},n.decode=function(t,e){if("string"!=typeof t)throw new TypeError('"input" must be a string.');if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');var r=a[e];if(!r){r=a[e]=[];for(var n=0;n<e.length;++n)r[e.charCodeAt(n)]=n}t=t.replace(/\s/g,"");var s=e.length,o=e.charAt(0),h=[0];for(n=0;n<t.length;n++){var u=r[t.charCodeAt(n)];if(void 0===u)return;for(var f=0,l=u;f<h.length;++f)l+=h[f]*s,h[f]=255&l,l>>=8;for(;l>0;)h.push(255&l),l>>=8}for(var c=0;t[c]===o&&c<t.length-1;++c)h.push(0);return void 0!==i?i.from(h.reverse()):new Uint8Array(h.reverse())}},4101:(t,e,r)=>{"use strict";var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(8078),o=r(1241),h=r(2861).Buffer;t.exports=function(t,e){var r,u=t.toString(),f=u.match(i);if(f){var l="aes"+f[1],c=h.from(f[2],"hex"),d=h.from(f[3].replace(/[\r\n]/g,""),"base64"),p=s(e,c.slice(0,8),parseInt(f[1],10)).key,m=[],g=o.createDecipheriv(l,p,c);m.push(g.update(d)),m.push(g.final()),r=h.concat(m)}else{var y=u.match(a);r=h.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(n)[1],data:r}}},4107:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).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],o=new Array(64);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function c(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(h,n),h.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},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,h=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=t.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((e=r[y-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var v=0;v<64;++v){var b=g+c(h)+u(h,p,m)+s[v]+r[v]|0,w=l(i)+f(i,n,a)|0;g=m,m=p,p=h,h=o+b|0,o=a,a=n,n=i,i=b+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},h.prototype._hash=function(){var t=a.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=h},4116:(t,e,r)=>{var i=r(8287),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(a(i,e),e.Buffer=s),a(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},4196:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!=r)throw new TypeError("Bad key length")}},4309:(t,e,r)=>{var i=r(276);r(2746);var n=i.asn1;e.privateKeyValidator={name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},e.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},4367:(t,e)=>{"use strict";var r=e;function i(t){return 1===t.length?"0"+t:t}function n(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var i=0;i<t.length;i++)r[i]=0|t[i];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16));else for(i=0;i<t.length;i++){var n=t.charCodeAt(i),a=n>>8,s=255&n;a?r.push(a,s):r.push(s)}return r},r.zero2=i,r.toHex=n,r.encode=function(t,e){return"hex"===e?n(t):t}},4589:t=>{"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},4598:(t,e,r)=>{var i=r(2153);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=i._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=i._reverse(e.tag)},4610:(t,e,r)=>{"use strict";t.exports=f;var i=r(6048).F,n=i.ERR_METHOD_NOT_IMPLEMENTED,a=i.ERR_MULTIPLE_CALLBACK,s=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=i.ERR_TRANSFORM_WITH_LENGTH_0,h=r(5382);function u(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function f(t){if(!(this instanceof f))return new f(t);h.call(this,t),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function l(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?c(this,null,null):this._flush((function(e,r){c(t,e,r)}))}function c(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new o;if(t._transformState.transforming)throw new s;return t.push(null)}r(6698)(f,h),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new n("_transform()"))},f.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},f.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},f.prototype._destroy=function(t,e){h.prototype._destroy.call(this,t,(function(t){e(t)}))}},4643:(t,e,r)=>{function i(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},4669:(t,e,r)=>{var i=e;i.der=r(82),i.pem=r(735)},4688:()=>{},4729:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(8310).Transform;function a(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(6698)(a,n),a.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(t){i=t}r(i)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)};var s="undefined"!=typeof Uint8Array,o="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(i.prototype instanceof Uint8Array||i.TYPED_ARRAY_SUPPORT);a.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=function(t,e){if(t instanceof i)return t;if("string"==typeof t)return i.from(t,e);if(o&&ArrayBuffer.isView(t)){if(0===t.byteLength)return i.alloc(0);var r=i.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(s&&t instanceof Uint8Array)return i.from(t);if(i.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return i.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,e);for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)r[this._blockOffset++]=t[n++];for(var h=0,u=8*t.length;u>0;++h)this._length[h]+=u,(u=this._length[h]/4294967296|0)>0&&(this._length[h]-=4294967296*u);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},4847:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(9404),a=r(6729).ec,s=r(8170),o=r(4589);function h(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}t.exports=function(t,e,r,u,f){var l=s(r);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var i=o[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new a(i),s=r.data.subjectPrivateKey.data;return n.verify(e,t,s)}(t,e,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var i=r.data.p,a=r.data.q,o=r.data.g,u=r.data.pub_key,f=s.signature.decode(t,"der"),l=f.s,c=f.r;h(l,a),h(c,a);var d=n.mont(i),p=l.invm(a);return 0===o.toRed(d).redPow(new n(e).mul(p).mod(a)).fromRed().mul(u.toRed(d).redPow(c.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(c)}(t,e,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");e=i.concat([f,e]);for(var c=l.modulus.byteLength(),d=[1],p=0;e.length+d.length+2<c;)d.push(255),p+=1;d.push(0);for(var m=-1;++m<e.length;)d.push(e[m]);d=i.from(d);var g=n.mont(l.modulus);t=(t=new n(t).toRed(g)).redPow(new n(l.publicExponent)),t=i.from(t.fromRed().toArray());var y=p<8?1:0;for(c=Math.min(t.length,d.length),t.length!==d.length&&(y=1),m=-1;++m<c;)y|=t[m]^d[m];return 0===y}},4910:(t,e,r)=>{var i=r(8287).Buffer,n=r(6473),a=new(r(2244)),s=new n(24),o=new n(11),h=new n(10),u=new n(3),f=new n(7),l=r(4934),c=r(3209);function d(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._pub=new n(t),this}function p(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._priv=new n(t),this}t.exports=g;var m={};function g(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function y(t,e){var r=new i(t.toArray());return e?r.toString(e):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in m)return m[i];var n,c=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!a.test(t))return c+=1,c+="02"===r||"05"===r?8:4,m[i]=c,c;switch(a.test(t.shrn(1))||(c+=2),r){case"02":t.mod(s).cmp(o)&&(c+=8);break;case"05":(n=t.mod(h)).cmp(u)&&n.cmp(f)&&(c+=8);break;default:c+=4}return m[i]=c,c}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new n(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(t){var e=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new i(e.toArray()),a=this.getPrime();if(r.length<a.length){var s=new i(a.length-r.length);s.fill(0),r=i.concat([s,r])}return r},g.prototype.getPublicKey=function(t){return y(this._pub,t)},g.prototype.getPrivateKey=function(t){return y(this._priv,t)},g.prototype.getPrime=function(t){return y(this.__prime,t)},g.prototype.getGenerator=function(t){return y(this._gen,t)},g.prototype.setGenerator=function(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this.__gen=t,this._gen=new n(t),this}},4934:(t,e,r)=>{var i=r(3209);t.exports=v,v.simpleSieve=g,v.fermatTest=y;var n=r(6473),a=new n(24),s=new(r(2244)),o=new n(1),h=new n(2),u=new n(5),f=(new n(16),new n(8),new n(10)),l=new n(3),c=(new n(7),new n(11)),d=new n(4),p=(new n(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<e&&t[n]<=i&&r%t[n]!=0;n++);e!==n&&t[n]<=i||(t[e++]=r)}return p=t,t}function g(t){for(var e=m(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function y(t){var e=n.mont(t);return 0===h.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function v(t,e){if(t<16)return new n(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new n(e);;){for(r=new n(i(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(o),r.testn(1)||r.iadd(h),e.cmp(h)){if(!e.cmp(u))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(a).cmp(c);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},5037:(t,e,r)=>{var i;function n(t){this.rand=t}if(t.exports=function(t){return i||(i=new n(null)),i.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=r(3776);if("function"!=typeof a.randomBytes)throw new Error("Not supported");n.prototype._rand=function(t){return a.randomBytes(t)}}catch(t){}},5071:(t,e,r)=>{var i=r(276);r(2746),r(1696),r(6418),r(9954),r(2698),r(9356),r(5805),r(1598),r(7619),r(8392);var n=i.asn1,a=i.pki,s=t.exports=i.pkcs12=i.pkcs12||{},o={name:"ContentInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:n.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},h={name:"PFX",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},o,{name:"PFX.macData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:n.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},u={name:"SafeBag",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:n.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},f={name:"Attribute",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,capture:"values"}]},l={name:"CertBag",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:n.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:n.Class.UNIVERSAL,type:n.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function c(t,e,r,i){for(var n=[],a=0;a<t.length;a++)for(var s=0;s<t[a].safeBags.length;s++){var o=t[a].safeBags[s];void 0!==i&&o.type!==i||(null!==e?void 0!==o.attributes[e]&&o.attributes[e].indexOf(r)>=0&&n.push(o):n.push(o))}return n}function d(t){if(t.composed||t.constructed){for(var e=i.util.createBuffer(),r=0;r<t.value.length;++r)e.putBytes(t.value[r].value);t.composed=t.constructed=!1,t.value=e.getBytes()}return t}function p(t,e){var r={},s=[];if(!n.validate(t,i.pkcs7.asn1.encryptedDataValidator,r,s))throw(o=new Error("Cannot read EncryptedContentInfo.")).errors=s,o;var o,h=n.derToOid(r.contentType);if(h!==a.oids.data)throw(o=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=h,o;h=n.derToOid(r.encAlgorithm);var u=a.pbe.getCipher(h,r.encParameter,e),f=d(r.encryptedContentAsn1),l=i.util.createBuffer(f.value);if(u.update(l),!u.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return u.output.getBytes()}function m(t,e,r){if(!e&&0===t.length)return[];if((t=n.fromDer(t,e)).tagClass!==n.Class.UNIVERSAL||t.type!==n.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var i=[],s=0;s<t.value.length;s++){var o=t.value[s],h={},f=[];if(!n.validate(o,u,h,f))throw(y=new Error("Cannot read SafeBag.")).errors=f,y;var c,d,p={type:n.derToOid(h.bagId),attributes:g(h.bagAttributes)};i.push(p);var m=h.bagValue.value[0];switch(p.type){case a.oids.pkcs8ShroudedKeyBag:if(null===(m=a.decryptPrivateKeyInfo(m,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case a.oids.keyBag:try{p.key=a.privateKeyFromAsn1(m)}catch(t){p.key=null,p.asn1=m}continue;case a.oids.certBag:c=l,d=function(){if(n.derToOid(h.certId)!==a.oids.x509Certificate){var t=new Error("Unsupported certificate type, only X.509 supported.");throw t.oid=n.derToOid(h.certId),t}var r=n.fromDer(h.cert,e);try{p.cert=a.certificateFromAsn1(r,!0)}catch(t){p.cert=null,p.asn1=r}};break;default:var y;throw(y=new Error("Unsupported PKCS#12 SafeBag type.")).oid=p.type,y}if(void 0!==c&&!n.validate(m,c,h,f))throw(y=new Error("Cannot read PKCS#12 "+c.name)).errors=f,y;d()}return i}function g(t){var e={};if(void 0!==t)for(var r=0;r<t.length;++r){var i={},s=[];if(!n.validate(t[r],f,i,s)){var o=new Error("Cannot read PKCS#12 BagAttribute.");throw o.errors=s,o}var h=n.derToOid(i.oid);if(void 0!==a.oids[h]){e[a.oids[h]]=[];for(var u=0;u<i.values.length;++u)e[a.oids[h]].push(i.values[u].value)}}return e}s.pkcs12FromAsn1=function(t,e,r){"string"==typeof e?(r=e,e=!0):void 0===e&&(e=!0);var u={};if(!n.validate(t,h,u,[]))throw(f=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=f,f;var f,l={version:u.version.charCodeAt(0),safeContents:[],getBags:function(t){var e,r={};return"localKeyId"in t?e=t.localKeyId:"localKeyIdHex"in t&&(e=i.util.hexToBytes(t.localKeyIdHex)),void 0===e&&!("friendlyName"in t)&&"bagType"in t&&(r[t.bagType]=c(l.safeContents,null,null,t.bagType)),void 0!==e&&(r.localKeyId=c(l.safeContents,"localKeyId",e,t.bagType)),"friendlyName"in t&&(r.friendlyName=c(l.safeContents,"friendlyName",t.friendlyName,t.bagType)),r},getBagsByFriendlyName:function(t,e){return c(l.safeContents,"friendlyName",t,e)},getBagsByLocalKeyId:function(t,e){return c(l.safeContents,"localKeyId",t,e)}};if(3!==u.version.charCodeAt(0))throw(f=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=u.version.charCodeAt(0),f;if(n.derToOid(u.contentType)!==a.oids.data)throw(f=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=n.derToOid(u.contentType),f;var g=u.content.value[0];if(g.tagClass!==n.Class.UNIVERSAL||g.type!==n.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(g=d(g),u.mac){var y=null,v=0,b=n.derToOid(u.macAlgorithm);switch(b){case a.oids.sha1:y=i.md.sha1.create(),v=20;break;case a.oids.sha256:y=i.md.sha256.create(),v=32;break;case a.oids.sha384:y=i.md.sha384.create(),v=48;break;case a.oids.sha512:y=i.md.sha512.create(),v=64;break;case a.oids.md5:y=i.md.md5.create(),v=16}if(null===y)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+b);var w=new i.util.ByteBuffer(u.macSalt),M="macIterations"in u?parseInt(i.util.bytesToHex(u.macIterations),16):1,_=s.generateKey(r,w,3,M,v,y),S=i.hmac.create();if(S.start(y,_),S.update(g.value),S.getMac().getBytes()!==u.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(t,e,r,i){if((e=n.fromDer(e,r)).tagClass!==n.Class.UNIVERSAL||e.type!==n.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s<e.value.length;s++){var h=e.value[s],u={},f=[];if(!n.validate(h,o,u,f))throw(y=new Error("Cannot read ContentInfo.")).errors=f,y;var l={encrypted:!1},c=null,g=u.content.value[0];switch(n.derToOid(u.contentType)){case a.oids.data:if(g.tagClass!==n.Class.UNIVERSAL||g.type!==n.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");c=d(g).value;break;case a.oids.encryptedData:c=p(g,i),l.encrypted=!0;break;default:var y;throw(y=new Error("Unsupported PKCS#12 contentType.")).contentType=n.derToOid(u.contentType),y}l.safeBags=m(c,r,i),t.safeContents.push(l)}}(l,g.value,e,r),l},s.toPkcs12Asn1=function(t,e,r,o){(o=o||{}).saltSize=o.saltSize||8,o.count=o.count||2048,o.algorithm=o.algorithm||o.encAlgorithm||"aes128","useMac"in o||(o.useMac=!0),"localKeyId"in o||(o.localKeyId=null),"generateLocalKeyId"in o||(o.generateLocalKeyId=!0);var h,u=o.localKeyId;if(null!==u)u=i.util.hexToBytes(u);else if(o.generateLocalKeyId)if(e){var f=i.util.isArray(e)?e[0]:e;"string"==typeof f&&(f=a.certificateFromPem(f)),(T=i.md.sha1.create()).update(n.toDer(a.certificateToAsn1(f)).getBytes()),u=T.digest().getBytes()}else u=i.random.getBytes(20);var l=[];null!==u&&l.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.localKeyId).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,u)])])),"friendlyName"in o&&l.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.friendlyName).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,n.Type.BMPSTRING,!1,o.friendlyName)])])),l.length>0&&(h=n.create(n.Class.UNIVERSAL,n.Type.SET,!0,l));var c=[],d=[];null!==e&&(d=i.util.isArray(e)?e:[e]);for(var p=[],m=0;m<d.length;++m){"string"==typeof(e=d[m])&&(e=a.certificateFromPem(e));var g=0===m?h:void 0,y=a.certificateToAsn1(e),v=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.certBag).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.x509Certificate).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(y).getBytes())])])]),g]);p.push(v)}if(p.length>0){var b=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,p),w=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.data).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(b).getBytes())])]);c.push(w)}var M=null;if(null!==t){var _=a.wrapRsaPrivateKey(a.privateKeyToAsn1(t));M=null===r?n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.keyBag).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[_]),h]):n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.pkcs8ShroudedKeyBag).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[a.encryptPrivateKeyInfo(_,r,o)]),h]);var S=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[M]),E=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.data).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(S).getBytes())])]);c.push(E)}var C,A=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,c);if(o.useMac){var T=i.md.sha1.create(),B=new i.util.ByteBuffer(i.random.getBytes(o.saltSize)),I=o.count,k=(t=s.generateKey(r,B,3,I,20),i.hmac.create());k.start(T,t),k.update(n.toDer(A).getBytes());var R=k.getMac();C=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.sha1).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,R.getBytes())]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,B.getBytes()),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(I).getBytes())])}return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(3).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.data).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(A).getBytes())])]),C])},s.generateKey=i.pbe.generatePkcs12Key},5122:t=>{t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},5124:(t,e,r)=>{var i=r(276);r(7619);var n=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],a=[1,2,3,5],s=function(t,e){return t<<e&65535|(65535&t)>>16-e},o=function(t,e){return(65535&t)>>e|t<<16-e&65535};t.exports=i.rc2=i.rc2||{},i.rc2.expandKey=function(t,e){"string"==typeof t&&(t=i.util.createBuffer(t)),e=e||128;var r,a=t,s=t.length(),o=e,h=Math.ceil(o/8),u=255>>(7&o);for(r=s;r<128;r++)a.putByte(n[a.at(r-1)+a.at(r-s)&255]);for(a.setAt(128-h,n[a.at(128-h)&u]),r=127-h;r>=0;r--)a.setAt(r,n[a.at(r+1)^a.at(r+h)]);return a};var h=function(t,e,r){var n,h,u,f,l=!1,c=null,d=null,p=null,m=[];for(t=i.rc2.expandKey(t,e),u=0;u<64;u++)m.push(t.getInt16Le());r?(n=function(t){for(u=0;u<4;u++)t[u]+=m[f]+(t[(u+3)%4]&t[(u+2)%4])+(~t[(u+3)%4]&t[(u+1)%4]),t[u]=s(t[u],a[u]),f++},h=function(t){for(u=0;u<4;u++)t[u]+=m[63&t[(u+3)%4]]}):(n=function(t){for(u=3;u>=0;u--)t[u]=o(t[u],a[u]),t[u]-=m[f]+(t[(u+3)%4]&t[(u+2)%4])+(~t[(u+3)%4]&t[(u+1)%4]),f--},h=function(t){for(u=3;u>=0;u--)t[u]-=m[63&t[(u+3)%4]]});var g=function(t){var e=[];for(u=0;u<4;u++){var i=c.getInt16Le();null!==p&&(r?i^=p.getInt16Le():p.putInt16Le(i)),e.push(65535&i)}f=r?0:63;for(var n=0;n<t.length;n++)for(var a=0;a<t[n][0];a++)t[n][1](e);for(u=0;u<4;u++)null!==p&&(r?p.putInt16Le(e[u]):e[u]^=p.getInt16Le()),d.putInt16Le(e[u])},y=null;return y={start:function(t,e){t&&"string"==typeof t&&(t=i.util.createBuffer(t)),l=!1,c=i.util.createBuffer(),d=e||new i.util.createBuffer,p=t,y.output=d},update:function(t){for(l||c.putBuffer(t);c.length()>=8;)g([[5,n],[1,h],[6,n],[1,h],[5,n]])},finish:function(t){var e=!0;if(r)if(t)e=t(8,c,!r);else{var i=8===c.length()?8:8-c.length();c.fillWithByte(i,i)}if(e&&(l=!0,y.update()),!r&&(e=0===c.length()))if(t)e=t(8,d,!r);else{var n=d.length(),a=d.at(n-1);a>n?e=!1:d.truncate(a)}return e}}};i.rc2.startEncrypting=function(t,e,r){var n=i.rc2.createEncryptionCipher(t,128);return n.start(e,r),n},i.rc2.createEncryptionCipher=function(t,e){return h(t,e,!0)},i.rc2.startDecrypting=function(t,e,r){var n=i.rc2.createDecryptionCipher(t,128);return n.start(e,r),n},i.rc2.createDecryptionCipher=function(t,e){return h(t,e,!1)}},5157:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},5242:(t,e,r)=>{"use strict";t.exports=a;var i=r(1816),n=Object.create(r(5622));function a(t){if(!(this instanceof a))return new a(t);i.call(this,t)}n.inherits=r(6698),n.inherits(a,i),a.prototype._transform=function(t,e,r){r(null,t)}},5250:(t,e,r)=>{var i=r(276);r(7619),i.mgf=i.mgf||{},(t.exports=i.mgf.mgf1=i.mgf1=i.mgf1||{}).create=function(t){return{generate:function(e,r){for(var n=new i.util.ByteBuffer,a=Math.ceil(r/t.digestLength),s=0;s<a;s++){var o=new i.util.ByteBuffer;o.putInt32(s),t.start(),t.update(e+o.getBytes()),n.putBuffer(t.digest())}return n.truncate(n.length()-r),n.getBytes()}}}},5264:(t,e,r)=>{var i=r(2861).Buffer;function n(t,e,r){for(var i,n,s=-1,o=0;++s<8;)i=e&1<<7-s?128:0,o+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^i))>>s%8,t._prev=a(t._prev,r?i:n);return o}function a(t,e){var r=t.length,n=-1,a=i.allocUnsafe(t.length);for(t=i.concat([t,i.from([e])]);++n<r;)a[n]=t[n]<<1|t[n+1]>>7;return a}e.encrypt=function(t,e,r){for(var a=e.length,s=i.allocUnsafe(a),o=-1;++o<a;)s[o]=n(t,e[o],r);return s}},5279:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698),a=r(2808),s=r(2211);function o(t,e){i.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),a=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:r})]}function h(t){a.call(this,t);var e=new o(this.type,this.options.key);this._edeState=e}n(h,a),t.exports=h,h.create=function(t){return new h(t)},h.prototype._update=function(t,e,r,i){var n=this._edeState;n.ciphers[0]._update(t,e,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},h.prototype._pad=s.prototype._pad,h.prototype._unpad=s.prototype._unpad},5291:(t,e,r)=>{"use strict";var i=r(6048).F.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,n){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,n,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new i(n?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},5340:()=>{},5359:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(3507),a=r(7332),s=r(6729).ec,o=r(9404),h=r(8170),u=r(4589);function f(t,e,r,a){if((t=i.from(t.toArray())).length<e.byteLength()){var s=i.alloc(e.byteLength()-t.length);t=i.concat([s,t])}var o=r.length,h=function(t,e){t=(t=l(t,e)).mod(e);var r=i.from(t.toArray());if(r.length<e.byteLength()){var n=i.alloc(e.byteLength()-r.length);r=i.concat([n,r])}return r}(r,e),u=i.alloc(o);u.fill(1);var f=i.alloc(o);return f=n(a,f).update(u).update(i.from([0])).update(t).update(h).digest(),u=n(a,f).update(u).digest(),{k:f=n(a,f).update(u).update(i.from([1])).update(t).update(h).digest(),v:u=n(a,f).update(u).digest()}}function l(t,e){var r=new o(t),i=(t.length<<3)-e.bitLength();return i>0&&r.ishrn(i),r}function c(t,e,r){var a,s;do{for(a=i.alloc(0);8*a.length<t.bitLength();)e.v=n(r,e.k).update(e.v).digest(),a=i.concat([a,e.v]);s=l(a,t),e.k=n(r,e.k).update(e.v).update(i.from([0])).digest(),e.v=n(r,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function d(t,e,r,i){return t.toRed(o.mont(r)).redPow(e).fromRed().mod(i)}t.exports=function(t,e,r,n,p){var m=h(e);if(m.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return function(t,e){var r=u[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var n=new s(r).keyFromPrivate(e.privateKey).sign(t);return i.from(n.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==n)throw new Error("wrong private key type");return function(t,e,r){for(var n,a=e.params.priv_key,s=e.params.p,h=e.params.q,u=e.params.g,p=new o(0),m=l(t,h).mod(h),g=!1,y=f(a,h,t,r);!1===g;)p=d(u,n=c(h,y,r),s,h),0===(g=n.invm(h).imul(m.add(a.mul(p))).mod(h)).cmpn(0)&&(g=!1,p=new o(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var r=[48,t.length+e.length+4,2,t.length];return r=r.concat(t,[2,e.length],e),i.from(r)}(p,g)}(t,m,r)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");if(void 0!==e.padding&&1!==e.padding)throw new Error("illegal or unsupported padding mode");t=i.concat([p,t]);for(var g=m.modulus.byteLength(),y=[0,1];t.length+y.length+1<g;)y.push(255);y.push(0);for(var v=-1;++v<t.length;)y.push(t[v]);return a(y,m)},t.exports.getKey=f,t.exports.makeKey=c},5380:(t,e,r)=>{var i=r(8287).Buffer,n=r(4934),a=r(3241),s=r(4910),o={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new i(a[t].prime,"hex"),r=new i(a[t].gen,"hex");return new s(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,a,h){return i.isBuffer(r)||void 0===o[r]?t(e,"binary",r,a):(r=r||"binary",h=h||"binary",a=a||new i([2]),i.isBuffer(a)||(a=new i(a,h)),"number"==typeof e?new s(n(e,a),a,!0):(i.isBuffer(e)||(e=new i(e,r)),new s(e,a,!0)))}},5382:(t,e,r)=>{"use strict";var i=r(5606),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var a=r(5412),s=r(6708);r(6698)(f,a);for(var o=n(s.prototype),h=0;h<o.length;h++){var u=o[h];f.prototype[u]||(f.prototype[u]=s.prototype[u])}function f(t){if(!(this instanceof f))return new f(t);a.call(this,t),s.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||i.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},5412:(t,e,r)=>{"use strict";var i,n=r(5606);t.exports=C,C.ReadableState=E,r(7007).EventEmitter;var a,s=function(t,e){return t.listeners(e).length},o=r(345),h=r(8287).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(9838);a=f&&f.debuglog?f.debuglog("stream"):function(){};var l,c,d,p=r(2726),m=r(5896),g=r(5291).getHighWaterMark,y=r(6048).F,v=y.ERR_INVALID_ARG_TYPE,b=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,M=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(6698)(C,o);var _=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,e,n){i=i||r(5382),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,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.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=r(3141).I),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function C(t){if(i=i||r(5382),!(this instanceof C))return new C(t);var e=this instanceof i;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function A(t,e,r,i,n){a("readableAddChunk",e);var s,o=t._readableState;if(null===e)o.reading=!1,function(t,e){if(a("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}}(t,o);else if(n||(s=function(t,e){var r,i;return i=e,h.isBuffer(i)||i instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],e)),r}(o,e)),s)_(t,s);else if(o.objectMode||e&&e.length>0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),i)o.endEmitted?_(t,new M):T(t,o,e,!0);else if(o.ended)_(t,new b);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?T(t,o,e,!1):N(t,o)):T(t,o,e,!1)}else i||(o.reading=!1,N(t,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function T(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),N(t,e)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),C.prototype.destroy=m.destroy,C.prototype._undestroy=m.undestroy,C.prototype._destroy=function(t,e){e(t)},C.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=h.from(t,e),e=""),r=!0),A(this,t,e,!1,r)},C.prototype.unshift=function(t){return A(this,t,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(t){l||(l=r(3141).I);var e=new l(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=e.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var B=1073741824;function I(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=B?t=B:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;a("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(a("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(R,t))}function R(t){var e=t._readableState;a("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,P(t)}function N(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(L,t,e))}function L(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(a("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function x(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function U(t){a("readable nexttick read 0"),t.read(0)}function D(t,e){a("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),P(t),e.flowing&&!e.reading&&t.read(0)}function P(t){var e=t._readableState;for(a("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function K(t){var e=t._readableState;a("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(j,e,t))}function j(t,e){if(a("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}C.prototype.read=function(t){a("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return a("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?K(this):k(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&K(this),null;var i,n=e.needReadable;return a("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&a("length less than watermark",n=!0),e.ended||e.reading?a("reading or ended",n=!1):n&&(a("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=I(r,e))),null===(i=t>0?O(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&K(this)),null!==i&&this.emit("data",i),i},C.prototype._read=function(t){_(this,new w("_read()"))},C.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,e);var o=e&&!1===e.end||t===n.stdout||t===n.stderr?m:h;function h(){a("onend"),t.end()}i.endEmitted?n.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,s){a("onunpipe"),n===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,a("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",c),t.removeListener("unpipe",e),r.removeListener("end",h),r.removeListener("end",m),r.removeListener("data",l),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}));var u=function(t){return function(){var e=t._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,P(t))}}(r);t.on("drain",u);var f=!1;function l(e){a("ondata");var n=t.write(e);a("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==q(i.pipes,t))&&!f&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(e){a("onerror",e),m(),t.removeListener("error",c),0===s(t,"error")&&_(t,e)}function d(){t.removeListener("finish",p),m()}function p(){a("onfinish"),t.removeListener("close",d),m()}function m(){a("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",r),i.flowing||(a("pipe resume"),r.resume()),t},C.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=q(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},C.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(U,this))),r},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(x,this),r},C.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(x,this),e},C.prototype.resume=function(){var t=this._readableState;return t.flowing||(a("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(D,t,e))}(this,t)),t.paused=!1,this},C.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(a("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){a("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<S.length;s++)t.on(S[s],this.emit.bind(this,S[s]));return this._read=function(e){a("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(2955)),c(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),C._fromList=O,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(t,e){return void 0===d&&(d=r(5157)),d(C,t,e)})},5567:(t,e,r)=>{t.exports=r(7007).EventEmitter},5579:t=>{"use strict";t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},5606:t=>{var e,r,i=t.exports={};function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var o,h=[],u=!1,f=-1;function l(){u&&o&&(u=!1,o.length?h=o.concat(h):f=-1,h.length&&c())}function c(){if(!u){var t=s(l);u=!0;for(var e=h.length;e;){for(o=h,h=[];++f<e;)o&&o[f].run();f=-1,e=h.length}o=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new d(t,e)),1!==h.length||u||s(c)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},5622:(t,e,r)=>{function i(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===i(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===i(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===i(t)},e.isError=function(t){return"[object Error]"===i(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(8287).Buffer.isBuffer},5715:(t,e,r)=>{"use strict";t.exports=r(2951)},5799:(t,e,r)=>{var i=r(530),n=r(2356),a=r(2861).Buffer,s=r(650),o=r(6168),h=r(462),u=r(8078);function f(t,e,r){o.call(this),this._cache=new c,this._cipher=new h.AES(e),this._prev=a.from(r),this._mode=t,this._autopadding=!0}r(6698)(f,o),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return a.concat(i)};var l=a.alloc(16,16);function c(){this.cache=a.allocUnsafe(0)}function d(t,e,r){var o=i[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=a.from(e)),e.length!==o.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=a.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===o.type?new s(o.module,e,r):"auth"===o.type?new n(o.module,e,r):new f(o.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},c.prototype.add=function(t){this.cache=a.concat([this.cache,t])},c.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},c.prototype.flush=function(){for(var t=16-this.cache.length,e=a.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return a.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var r=i[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(e,!1,r.key,r.iv);return d(t,n.key,n.iv)}},5805:(t,e,r)=>{var i=r(276);if(r(2746),r(3736),r(6418),r(7501),r(268),r(9356),r(7619),void 0===n)var n=i.jsbn.BigInteger;var a=i.util.isNodejs?r(310):null,s=i.asn1,o=i.util;i.pki=i.pki||{},t.exports=i.pki.rsa=i.rsa=i.rsa||{};var h=i.pki,u=[6,4,2,4,2,4,6,2],f={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},c={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=i.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},m=function(t){var e;if(!(t.algorithm in h.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}e=h.oids[t.algorithm];var i=s.oidToDer(e).getBytes(),n=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),a=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);a.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,i)),a.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var o=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,t.digest().getBytes());return n.value.push(a),n.value.push(o),s.toDer(n).getBytes()},g=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);var a;e.dP||(e.dP=e.d.mod(e.p.subtract(n.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(n.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));do{a=new n(i.util.bytesToHex(i.random.getBytes(e.n.bitLength()/8)),16)}while(a.compareTo(e.n)>=0||!a.gcd(e.n).equals(n.ONE));for(var s=(t=t.multiply(a.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),o=t.mod(e.q).modPow(e.dQ,e.q);s.compareTo(o)<0;)s=s.add(e.p);var h=s.subtract(o).multiply(e.qInv).mod(e.p).multiply(e.q).add(o);return h.multiply(a.modInverse(e.n)).mod(e.n)};function y(t,e,r){var n=i.util.createBuffer(),a=Math.ceil(e.n.bitLength()/8);if(t.length>a-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=a-11,s}n.putByte(0),n.putByte(r);var o,h=a-3-t.length;if(0===r||1===r){o=0===r?0:255;for(var u=0;u<h;++u)n.putByte(o)}else for(;h>0;){var f=0,l=i.random.getBytes(h);for(u=0;u<h;++u)0===(o=l.charCodeAt(u))?++f:n.putByte(o);h=f}return n.putByte(0),n.putBytes(t),n}function v(t,e,r,n){var a=Math.ceil(e.n.bitLength()/8),s=i.util.createBuffer(t),o=s.getByte(),h=s.getByte();if(0!==o||r&&0!==h&&1!==h||!r&&2!=h||r&&0===h&&void 0===n)throw new Error("Encryption block is invalid.");var u=0;if(0===h){u=a-3-n;for(var f=0;f<u;++f)if(0!==s.getByte())throw new Error("Encryption block is invalid.")}else if(1===h)for(u=0;s.length()>1;){if(255!==s.getByte()){--s.read;break}++u}else if(2===h)for(u=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++u}if(0!==s.getByte()||u!==a-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function b(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=i.util.hexToBytes(e);return!(r.length>1)||(0!==r.charCodeAt(0)||128&r.charCodeAt(1))&&(255!==r.charCodeAt(0)||128&~r.charCodeAt(1))?r:r.substr(1)}function w(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function M(t){return i.util.isNodejs&&"function"==typeof a[t]}function _(t){return void 0!==o.globalScope&&"object"==typeof o.globalScope.crypto&&"object"==typeof o.globalScope.crypto.subtle&&"function"==typeof o.globalScope.crypto.subtle[t]}function S(t){return void 0!==o.globalScope&&"object"==typeof o.globalScope.msCrypto&&"object"==typeof o.globalScope.msCrypto.subtle&&"function"==typeof o.globalScope.msCrypto.subtle[t]}function E(t){for(var e=i.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}h.rsa.encrypt=function(t,e,r){var a,s=r,o=Math.ceil(e.n.bitLength()/8);!1!==r&&!0!==r?(s=2===r,a=y(t,e,r)):(a=i.util.createBuffer()).putBytes(t);for(var h=new n(a.toHex(),16),u=g(h,e,s).toString(16),f=i.util.createBuffer(),l=o-Math.ceil(u.length/2);l>0;)f.putByte(0),--l;return f.putBytes(i.util.hexToBytes(u)),f.getBytes()},h.rsa.decrypt=function(t,e,r,a){var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var o=new Error("Encrypted message length is invalid.");throw o.length=t.length,o.expected=s,o}var h=new n(i.util.createBuffer(t).toHex(),16);if(h.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=g(h,e,r).toString(16),f=i.util.createBuffer(),l=s-Math.ceil(u.length/2);l>0;)f.putByte(0),--l;return f.putBytes(i.util.hexToBytes(u)),!1!==a?v(f.getBytes(),e,r):f.getBytes()},h.rsa.createKeyPairGenerationState=function(t,e,r){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var a,s=(r=r||{}).prng||i.random,o={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r<t.length;++r)t[r]=e.charCodeAt(r)}},h=r.algorithm||"PRIMEINC";if("PRIMEINC"!==h)throw new Error("Invalid key generation algorithm: "+h);return(a={algorithm:h,state:0,bits:t,rng:o,eInt:e||65537,e:new n(null),p:null,q:null,qBits:t>>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(a.eInt),a},h.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new n(null);r.fromInt(30);for(var i,a=0,s=function(t,e){return t|e},o=+new Date,f=0;null===t.keys&&(e<=0||f<e);){if(0===t.state){var l=null===t.p?t.pBits:t.qBits,c=l-1;0===t.pqState?(t.num=new n(l,t.rng),t.num.testBit(c)||t.num.bitwiseTo(n.ONE.shiftLeft(c),s,t.num),t.num.dAddOffset(31-t.num.mod(r).byteValue(),0),a=0,++t.pqState):1===t.pqState?t.num.bitLength()>l?t.pqState=0:t.num.isProbablePrime(w(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(u[a++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(n.ONE).gcd(t.e).compareTo(n.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(n.ONE),t.q1=t.q.subtract(n.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(n.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var d=t.e.modInverse(t.phi);t.keys={privateKey:h.rsa.setPrivateKey(t.n,t.e,d,t.p,t.q,d.mod(t.p1),d.mod(t.q1),t.q.modInverse(t.p)),publicKey:h.rsa.setPublicKey(t.n,t.e)}}f+=(i=+new Date)-o,o=i}return null!==t.keys},h.rsa.generateKeyPair=function(t,e,r,u){if(1===arguments.length?"object"==typeof t?(r=t,t=void 0):"function"==typeof t&&(u=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof e?(u=e,e=void 0):"number"!=typeof e&&(r=e,e=void 0):(r=t,u=e,t=void 0,e=void 0):3===arguments.length&&("number"==typeof e?"function"==typeof r&&(u=r,r=void 0):(u=r,r=e,e=void 0)),r=r||{},void 0===t&&(t=r.bits||2048),void 0===e&&(e=r.e||65537),!i.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(65537===e||3===e))if(u){if(M("generateKeyPair"))return a.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(t,e,r){if(t)return u(t);u(null,{privateKey:h.privateKeyFromPem(r),publicKey:h.publicKeyFromPem(e)})}));if(_("generateKey")&&_("exportKey"))return o.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:E(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(t){return o.globalScope.crypto.subtle.exportKey("pkcs8",t.privateKey)})).then(void 0,(function(t){u(t)})).then((function(t){if(t){var e=h.privateKeyFromAsn1(s.fromDer(i.util.createBuffer(t)));u(null,{privateKey:e,publicKey:h.setRsaPublicKey(e.n,e.e)})}}));if(S("generateKey")&&S("exportKey")){var f=o.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:E(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return f.oncomplete=function(t){var e=t.target.result,r=o.globalScope.msCrypto.subtle.exportKey("pkcs8",e.privateKey);r.oncomplete=function(t){var e=t.target.result,r=h.privateKeyFromAsn1(s.fromDer(i.util.createBuffer(e)));u(null,{privateKey:r,publicKey:h.setRsaPublicKey(r.n,r.e)})},r.onerror=function(t){u(t)}},void(f.onerror=function(t){u(t)})}}else if(M("generateKeyPairSync")){var l=a.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:h.privateKeyFromPem(l.privateKey),publicKey:h.publicKeyFromPem(l.publicKey)}}var c=h.rsa.createKeyPairGenerationState(t,e,r);if(!u)return h.rsa.stepKeyPairGenerationState(c,0),c.keys;!function(t,e,r){"function"==typeof e&&(r=e,e={});var a={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};function s(){o(t.pBits,(function(e,i){return e?r(e):(t.p=i,null!==t.q?u(e,t.q):void o(t.qBits,u))}))}function o(t,e){i.prime.generateProbablePrime(t,a,e)}function u(e,i){if(e)return r(e);if(t.q=i,t.p.compareTo(t.q)<0){var a=t.p;t.p=t.q,t.q=a}if(0!==t.p.subtract(n.ONE).gcd(t.e).compareTo(n.ONE))return t.p=null,void s();if(0!==t.q.subtract(n.ONE).gcd(t.e).compareTo(n.ONE))return t.q=null,void o(t.qBits,u);if(t.p1=t.p.subtract(n.ONE),t.q1=t.q.subtract(n.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(n.ONE))return t.p=t.q=null,void s();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void o(t.qBits,u);var f=t.e.modInverse(t.phi);t.keys={privateKey:h.rsa.setPrivateKey(t.n,t.e,f,t.p,t.q,f.mod(t.p1),f.mod(t.q1),t.q.modInverse(t.p)),publicKey:h.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}"prng"in e&&(a.prng=e.prng),s()}(c,r,u)},h.setRsaPublicKey=h.rsa.setPublicKey=function(t,e){var r={n:t,e,encrypt:function(t,e,n){if("string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,r){return y(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return i.pkcs1.encode_rsa_oaep(e,t,n)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"==typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var a=e.encode(t,r,!0);return h.rsa.encrypt(a,r,!0)},verify:function(t,e,n,a){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),void 0===a&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===n?n={verify:function(t,e){e=v(e,r,!0);var n=s.fromDer(e,{parseAllBytes:a._parseAllDigestBytes}),o={},h=[];if(!s.validate(n,p,o,h))throw(u=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=h,u;var u,f=s.derToOid(o.algorithmIdentifier);if(f!==i.oids.md2&&f!==i.oids.md5&&f!==i.oids.sha1&&f!==i.oids.sha224&&f!==i.oids.sha256&&f!==i.oids.sha384&&f!==i.oids.sha512&&f!==i.oids["sha512-224"]&&f!==i.oids["sha512-256"])throw(u=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=f,u;if((f===i.oids.md2||f===i.oids.md5)&&!("parameters"in o))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return t===o.digest}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(t,e){return t===v(e,r,!0)}});var o=h.rsa.decrypt(e,r,!0,!1);return n.verify(t,o,r.n.bitLength())}};return r},h.setRsaPrivateKey=h.rsa.setPrivateKey=function(t,e,r,n,a,s,o,u){var f={n:t,e,d:r,p:n,q:a,dP:s,dQ:o,qInv:u,decrypt:function(t,e,r){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var n=h.rsa.decrypt(t,f,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:v};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return i.pkcs1.decode_rsa_oaep(e,t,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(n,f,!1)},sign:function(t,e){var r=!1;"string"==typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:m},r=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},r=1);var i=e.encode(t,f.n.bitLength());return h.rsa.encrypt(i,f,r)}};return f},h.wrapRsaPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(h.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(t).getBytes())])},h.privateKeyFromAsn1=function(t){var e,r,a,o,u,c,d,p,m={},g=[];if(s.validate(t,f,m,g)&&(t=s.fromDer(i.util.createBuffer(m.privateKey))),m={},g=[],!s.validate(t,l,m,g)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=g,y}return e=i.util.createBuffer(m.privateKeyModulus).toHex(),r=i.util.createBuffer(m.privateKeyPublicExponent).toHex(),a=i.util.createBuffer(m.privateKeyPrivateExponent).toHex(),o=i.util.createBuffer(m.privateKeyPrime1).toHex(),u=i.util.createBuffer(m.privateKeyPrime2).toHex(),c=i.util.createBuffer(m.privateKeyExponent1).toHex(),d=i.util.createBuffer(m.privateKeyExponent2).toHex(),p=i.util.createBuffer(m.privateKeyCoefficient).toHex(),h.setRsaPrivateKey(new n(e,16),new n(r,16),new n(a,16),new n(o,16),new n(u,16),new n(c,16),new n(d,16),new n(p,16))},h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.qInv))])},h.publicKeyFromAsn1=function(t){var e={},r=[];if(s.validate(t,d,e,r)){var a,o=s.derToOid(e.publicKeyOid);if(o!==h.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=o,a;t=e.rsaPublicKey}if(r=[],!s.validate(t,c,e,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var u=i.util.createBuffer(e.publicKeyModulus).toHex(),f=i.util.createBuffer(e.publicKeyExponent).toHex();return h.setRsaPublicKey(new n(u,16),new n(f,16))},h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(h.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[h.publicKeyToRSAPublicKey(t)])])},h.publicKeyToRSAPublicKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.e))])}},5892:(t,e,r)=>{var i=r(2861).Buffer,n=i.alloc(16,0);function a(t){var e=i.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,i=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],n=[0,0,0,0],s=-1;++s<128;){for(!!(this.state[~~(s/8)]&1<<7-s%8)&&(n[0]^=i[0],n[1]^=i[1],n[2]^=i[2],n[3]^=i[3]),r=!!(1&i[3]),e=3;e>0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=a(n)},s.prototype.update=function(t){var e;for(this.cache=i.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(a([0,t,0,e])),this.state},t.exports=s},5896:(t,e,r)=>{"use strict";var i=r(5606);function n(t,e){s(t,e),a(t)}function a(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return o||h?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(s,this,t)):i.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?i.nextTick(a,r):(r._writableState.errorEmitted=!0,i.nextTick(n,r,t)):i.nextTick(n,r,t):e?(i.nextTick(a,r),e(t)):i.nextTick(a,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}}},6011:(t,e,r)=>{"use strict";var i=r(8287).Buffer,n=r(6698),a=r(4729),s=new Array(16),o=[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],h=[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],u=[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],f=[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],l=[0,1518500249,1859775393,2400959708,2840853838],c=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,r,i,n,a,s,o){return p(t+(e^r^i)+a+s|0,o)+n|0}function g(t,e,r,i,n,a,s,o){return p(t+(e&r|~e&i)+a+s|0,o)+n|0}function y(t,e,r,i,n,a,s,o){return p(t+((e|~r)^i)+a+s|0,o)+n|0}function v(t,e,r,i,n,a,s,o){return p(t+(e&i|r&~i)+a+s|0,o)+n|0}function b(t,e,r,i,n,a,s,o){return p(t+(e^(r|~i))+a+s|0,o)+n|0}n(d,a),d.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,w=0|this._a,M=0|this._b,_=0|this._c,S=0|this._d,E=0|this._e,C=0;C<80;C+=1){var A,T;C<16?(A=m(r,i,n,a,d,t[o[C]],l[0],u[C]),T=b(w,M,_,S,E,t[h[C]],c[0],f[C])):C<32?(A=g(r,i,n,a,d,t[o[C]],l[1],u[C]),T=v(w,M,_,S,E,t[h[C]],c[1],f[C])):C<48?(A=y(r,i,n,a,d,t[o[C]],l[2],u[C]),T=y(w,M,_,S,E,t[h[C]],c[2],f[C])):C<64?(A=v(r,i,n,a,d,t[o[C]],l[3],u[C]),T=g(w,M,_,S,E,t[h[C]],c[3],f[C])):(A=b(r,i,n,a,d,t[o[C]],l[4],u[C]),T=m(w,M,_,S,E,t[h[C]],c[4],f[C])),r=d,d=a,a=p(n,10),n=i,i=A,w=E,E=S,S=p(_,10),_=M,M=T}var B=this._b+n+S|0;this._b=this._c+a+E|0,this._c=this._d+d+w|0,this._d=this._e+r+M|0,this._e=this._a+i+_|0,this._a=B},d.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 t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},6048:t=>{"use strict";var e={};function r(t,r,i){i||(i=Error);var n=function(t){var e,i;function n(e,i,n){return t.call(this,function(t,e,i){return"string"==typeof r?r:r(t,e,i)}(e,i,n))||this}return i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n}(i);n.prototype.name=i.name,n.prototype.code=t,e[t]=n}function i(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,a,s,o,h;if("string"==typeof e&&(a="not ",e.substr(0,4)===a)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))s="The ".concat(t," ").concat(n," ").concat(i(e,"type"));else{var u=("number"!=typeof h&&(h=0),h+1>(o=t).length||-1===o.indexOf(".",h)?"argument":"property");s='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(i(e,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=e},6089:()=>{},6166:(t,e,r)=>{"use strict";var i=r(7426),n=r(3349);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=a,a.prototype.update=function(t,e){if(t=i.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},a.prototype.digest=function(t){return this.update(this._pad()),n(null===this.pending),this._digest(t)},a.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(t<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=t>>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,a=8;a<this.padLength;a++)i[n++]=0;return i}},6168:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(8310).Transform,a=r(3141).I;function s(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(6698)(s,n);var o="undefined"!=typeof Uint8Array,h="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(i.prototype instanceof Uint8Array||i.TYPED_ARRAY_SUPPORT);s.prototype.update=function(t,e,r){var n=function(t,e){if(t instanceof i)return t;if("string"==typeof t)return i.from(t,e);if(h&&ArrayBuffer.isView(t)){if(0===t.byteLength)return i.alloc(0);var r=i.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(o&&t instanceof Uint8Array)return i.from(t);if(i.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return i.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,e),a=this._update(n);return this.hashMode?this:(r&&(a=this._toString(a,r)),a)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){i=t}finally{r(i)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can’t switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i},t.exports=s},6171:(t,e,r)=>{var i=r(2356),n=r(2861).Buffer,a=r(530),s=r(650),o=r(6168),h=r(462),u=r(8078);function f(t,e,r){o.call(this),this._cache=new l,this._last=void 0,this._cipher=new h.AES(e),this._prev=n.from(r),this._mode=t,this._autopadding=!0}function l(){this.cache=n.allocUnsafe(0)}function c(t,e,r){var o=a[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=n.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=n.from(e)),e.length!==o.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===o.type?new s(o.module,e,r,!0):"auth"===o.type?new i(o.module,e,r,!0):new f(o.module,e,r)}r(6698)(f,o),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return n.concat(i)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=n.concat([this.cache,t])},l.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=a[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=u(e,!1,r.key,r.iv);return c(t,i.key,i.iv)},e.createDecipheriv=c},6225:(t,e,r)=>{"use strict";var i=r(7426).rotr32;function n(t,e,r){return t&e^~t&r}function a(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,i){return 0===t?n(e,r,i):1===t||3===t?s(e,r,i):2===t?a(e,r,i):void 0},e.ch32=n,e.maj32=a,e.p32=s,e.s0_256=function(t){return i(t,2)^i(t,13)^i(t,22)},e.s1_256=function(t){return i(t,6)^i(t,11)^i(t,25)},e.g0_256=function(t){return i(t,7)^i(t,18)^t>>>3},e.g1_256=function(t){return i(t,17)^i(t,19)^t>>>10}},6229:(t,e,r)=>{"use strict";e.sha1=r(3917),e.sha224=r(7714),e.sha256=r(2287),e.sha384=r(1911),e.sha512=r(7766)},6238:(t,e,r)=>{"use strict";var i=r(6048).F.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function t(e,r,a){if("function"==typeof r)return t(e,null,r);r||(r={}),a=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}(a||n);var s=r.readable||!1!==r.readable&&e.readable,o=r.writable||!1!==r.writable&&e.writable,h=function(){e.writable||f()},u=e._writableState&&e._writableState.finished,f=function(){o=!1,u=!0,s||a.call(e)},l=e._readableState&&e._readableState.endEmitted,c=function(){s=!1,l=!0,o||a.call(e)},d=function(t){a.call(e,t)},p=function(){var t;return s&&!l?(e._readableState&&e._readableState.ended||(t=new i),a.call(e,t)):o&&!u?(e._writableState&&e._writableState.ended||(t=new i),a.call(e,t)):void 0},m=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",p),e.req?m():e.on("request",m)):o&&!e._writableState&&(e.on("end",h),e.on("close",h)),e.on("end",c),e.on("finish",f),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",f),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",f),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("end",c),e.removeListener("error",d),e.removeListener("close",p)}}},6248:(t,e,r)=>{"use strict";var i=r(3225),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var a=Object.create(r(5622));a.inherits=r(6698);var s=r(206),o=r(7314);a.inherits(l,s);for(var h=n(o.prototype),u=0;u<h.length;u++){var f=h[u];l.prototype[f]||(l.prototype[f]=o.prototype[f])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),o.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||i.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),i.nextTick(e,t)}},6278:(t,e,r)=>{"use strict";var i=r(3225);function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,t)):i.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,i.nextTick(n,r,t)):i.nextTick(n,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},6370:(t,e,r)=>{var i=r(276);r(7619),i.cipher=i.cipher||{};var n=t.exports=i.cipher.modes=i.cipher.modes||{};function a(t,e){if("string"==typeof t&&(t=i.util.createBuffer(t)),i.util.isArray(t)&&t.length>4){var r=t;t=i.util.createBuffer();for(var n=0;n<r.length;++n)t.putByte(r[n])}if(t.length()<e)throw new Error("Invalid IV length; got "+t.length()+" bytes and expected "+e+" bytes.");if(!i.util.isArray(t)){var a=[],s=e/4;for(n=0;n<s;++n)a.push(t.getInt32());t=a}return t}function s(t){t[t.length-1]=t[t.length-1]+1&4294967295}function o(t){return[t/4294967296|0,4294967295&t]}n.ecb=function(t){t=t||{},this.name="ECB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},n.ecb.prototype.start=function(t){},n.ecb.prototype.encrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._outBlock[i])},n.ecb.prototype.decrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._outBlock[i])},n.ecb.prototype.pad=function(t,e){var r=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(r,r),!0},n.ecb.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var r=t.length(),i=t.at(r-1);return!(i>this.blockSize<<2||(t.truncate(i),0))},n.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},n.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._prev=this._iv.slice(0)}},n.cbc.prototype.encrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=this._prev[i]^t.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._outBlock[i]);this._prev=this._outBlock},n.cbc.prototype.decrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._prev[i]^this._outBlock[i]);this._prev=this._inBlock.slice(0)},n.cbc.prototype.pad=function(t,e){var r=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(r,r),!0},n.cbc.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var r=t.length(),i=t.at(r-1);return!(i>this.blockSize<<2||(t.truncate(i),0))},n.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0},n.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},n.cfb.prototype.encrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)this._inBlock[n]=t.getInt32()^this._outBlock[n],e.putInt32(this._inBlock[n]);else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialBlock[n]=t.getInt32()^this._outBlock[n],this._partialOutput.putInt32(this._partialBlock[n]);if(a>0)t.read-=this.blockSize;else for(n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}},n.cfb.prototype.decrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)this._inBlock[n]=t.getInt32(),e.putInt32(this._inBlock[n]^this._outBlock[n]);else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialBlock[n]=t.getInt32(),this._partialOutput.putInt32(this._partialBlock[n]^this._outBlock[n]);if(a>0)t.read-=this.blockSize;else for(n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}},n.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0},n.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},n.ofb.prototype.encrypt=function(t,e,r){var i=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)e.putInt32(t.getInt32()^this._outBlock[n]),this._inBlock[n]=this._outBlock[n];else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialOutput.putInt32(t.getInt32()^this._outBlock[n]);if(a>0)t.read-=this.blockSize;else for(n=0;n<this._ints;++n)this._inBlock[n]=this._outBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}},n.ofb.prototype.decrypt=n.ofb.prototype.encrypt,n.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0},n.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},n.ctr.prototype.encrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)e.putInt32(t.getInt32()^this._outBlock[n]);else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialOutput.putInt32(t.getInt32()^this._outBlock[n]);if(a>0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},n.ctr.prototype.decrypt=n.ctr.prototype.encrypt,n.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0,this._R=3774873600},n.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,r=i.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?i.util.createBuffer(t.additionalData):i.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=i.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=r.length();if(12===n)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(o(8*n)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,e=i.util.createBuffer(e),this._aDataLength=o(8*e.length());var a=e.length()%this.blockSize;for(a&&e.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},n.gcm.prototype.encrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize){for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]^=t.getInt32());this._cipherLength+=this.blockSize}else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialOutput.putInt32(t.getInt32()^this._outBlock[n]);if(a<=0||r){if(r){var o=i%this.blockSize;this._cipherLength+=o,this._partialOutput.truncate(this.blockSize-o)}else this._cipherLength+=this.blockSize;for(n=0;n<this._ints;++n)this._outBlock[n]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},n.gcm.prototype.decrypt=function(t,e,r){var i=t.length();if(i<this.blockSize&&!(r&&i>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]^this._hashBlock[n]);i<this.blockSize?this._cipherLength+=i%this.blockSize:this._cipherLength+=this.blockSize},n.gcm.prototype.afterFinish=function(t,e){var r=!0;e.decrypt&&e.overflow&&t.truncate(this.blockSize-e.overflow),this.tag=i.util.createBuffer();var n=this._aDataLength.concat(o(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,n);var a=[];this.cipher.encrypt(this._j0,a);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^a[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},n.gcm.prototype.multiply=function(t,e){for(var r=[0,0,0,0],i=e.slice(0),n=0;n<128;++n)t[n/32|0]&1<<31-n%32&&(r[0]^=i[0],r[1]^=i[1],r[2]^=i[2],r[3]^=i[3]),this.pow(i,i);return r},n.gcm.prototype.pow=function(t,e){for(var r=1&t[3],i=3;i>0;--i)e[i]=t[i]>>>1|(1&t[i-1])<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)},n.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var i=t[r/8|0]>>>4*(7-r%8)&15,n=this._m[r][i];e[0]^=n[0],e[1]^=n[1],e[2]^=n[2],e[3]^=n[3]}return e},n.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)},n.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,i=4*r,n=16*r,a=new Array(n),s=0;s<n;++s){var o=[0,0,0,0],h=(i-1-s%i)*e;o[s/i|0]=1<<e-1<<h,a[s]=this.generateSubHashTable(this.multiply(o,t),e)}return a},n.gcm.prototype.generateSubHashTable=function(t,e){var r=1<<e,i=r>>>1,n=new Array(r);n[i]=t.slice(0);for(var a=i>>>1;a>0;)this.pow(n[2*a],n[a]=[]),a>>=1;for(a=2;a<i;){for(var s=1;s<a;++s){var o=n[a],h=n[s];n[a+s]=[o[0]^h[0],o[1]^h[1],o[2]^h[2],o[3]^h[3]]}a*=2}for(n[0]=[0,0,0,0],a=i+1;a<r;++a){var u=n[a^i];n[a]=[t[0]^u[0],t[1]^u[1],t[2]^u[2],t[3]^u[3]]}return n}},6383:(t,e,r)=>{var i=r(2861).Buffer,n=r(295);function a(t,e,r){var a=e.length,s=n(e,t._cache);return t._cache=t._cache.slice(a),t._prev=i.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var n,s=i.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=i.allocUnsafe(0)),!(t._cache.length<=e.length)){s=i.concat([s,a(t,e,r)]);break}n=t._cache.length,s=i.concat([s,a(t,e.slice(0,n),r)]),e=e.slice(n)}return s}},6413:(t,e,r)=>{"use strict";var i=r(7568),n=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),h=i.define("RelativeDistinguishedName",(function(){this.setof(a)})),u=i.define("RDNSequence",(function(){this.seqof(h)})),f=i.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),l=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),c=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional())})),p=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=p},6418:(t,e,r)=>{var i=r(276);i.pki=i.pki||{};var n=t.exports=i.pki.oids=i.oids=i.oids||{};function a(t,e){n[t]=e,n[e]=t}function s(t,e){n[t]=e}a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRSAEncryption"),a("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),a("1.2.840.113549.1.1.7","RSAES-OAEP"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.9","pSpecified"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),a("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),a("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),a("1.3.101.112","EdDSA25519"),a("1.2.840.10040.4.3","dsa-with-sha1"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("1.3.14.3.2.29","sha1WithRSASignature"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("2.16.840.1.101.3.4.2.4","sha224"),a("2.16.840.1.101.3.4.2.5","sha512-224"),a("2.16.840.1.101.3.4.2.6","sha512-256"),a("1.2.840.113549.2.2","md2"),a("1.2.840.113549.2.5","md5"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),a("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),a("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),a("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),a("1.2.840.113549.2.7","hmacWithSHA1"),a("1.2.840.113549.2.8","hmacWithSHA224"),a("1.2.840.113549.2.9","hmacWithSHA256"),a("1.2.840.113549.2.10","hmacWithSHA384"),a("1.2.840.113549.2.11","hmacWithSHA512"),a("1.2.840.113549.3.7","des-EDE3-CBC"),a("2.16.840.1.101.3.4.1.2","aes128-CBC"),a("2.16.840.1.101.3.4.1.22","aes192-CBC"),a("2.16.840.1.101.3.4.1.42","aes256-CBC"),a("2.5.4.3","commonName"),a("2.5.4.4","surname"),a("2.5.4.5","serialNumber"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.9","streetAddress"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.12","title"),a("2.5.4.13","description"),a("2.5.4.15","businessCategory"),a("2.5.4.17","postalCode"),a("2.5.4.42","givenName"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),a("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping")},6427:(t,e,r)=>{"use strict";var i=r(8393).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.I=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=s(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},6473:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6089).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,D=x>>>13,P=0|s[9],O=8191&P,K=P>>>13,j=0|o[0],q=8191&j,V=j>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(D,q)|0,a=Math.imul(D,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(K,q)|0,a=Math.imul(K,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(D,z)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(K,z)|0,a=Math.imul(K,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(K,Z)|0,a=Math.imul(K,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(K,Y)|0,a=Math.imul(K,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(K,$)|0,a=Math.imul(K,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(K,rt)|0,a=Math.imul(K,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(K,at)|0,a=Math.imul(K,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(D,ht)|0,a=a+Math.imul(D,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(K,ht)|0,a=Math.imul(K,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(K,lt)|0,a=Math.imul(K,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(K,pt)|0))<<13)|0;return u=((a=Math.imul(K,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6661:(t,e,r)=>{"use strict";var i=r(7011),n=i.assert,a=i.parseBytes,s=i.cachedProperty;function o(t,e){this.eddsa=t,this._secret=a(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=a(e.pub)}o.fromPublic=function(t,e){return e instanceof o?e:new o(t,{pub:e})},o.fromSecret=function(t,e){return e instanceof o?e:new o(t,{secret:e})},o.prototype.secret=function(){return this._secret},s(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(o,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,i=e.slice(0,t.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),s(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(t){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},o.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},o.prototype.getSecret=function(t){return n(this._secret,"KeyPair is public only"),i.encode(this.secret(),t)},o.prototype.getPublic=function(t){return i.encode(this.pubBytes(),t)},t.exports=o},6677:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011),a=n.getNAF,s=n.getJSF,o=n.assert;function h(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;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 u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=h,h.prototype.point=function(){throw new Error("Not implemented")},h.prototype.validate=function(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function(t,e){o(t.precomputed);var r=t._getDoubles(),i=a(e,1,this._bitLength),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;var s,h,u=[];for(s=0;s<i.length;s+=r.step){h=0;for(var f=s+r.step-1;f>=s;f--)h=(h<<1)+i[f];u.push(h)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=n;d>0;d--){for(s=0;s<u.length;s++)(h=u[s])===d?c=c.mixedAdd(r.points[s]):h===-d&&(c=c.mixedAdd(r.points[s].neg()));l=l.add(c)}return l.toP()},h.prototype._wnafMul=function(t,e){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var n=i.points,s=a(e,r,this._bitLength),h=this.jpoint(null,null,null),u=s.length-1;u>=0;u--){for(var f=0;u>=0&&0===s[u];u--)f++;if(u>=0&&f++,h=h.dblp(f),u<0)break;var l=s[u];o(0!==l),h="affine"===t.type?l>0?h.mixedAdd(n[l-1>>1]):h.mixedAdd(n[-l-1>>1].neg()):l>0?h.add(n[l-1>>1]):h.add(n[-l-1>>1].neg())}return"affine"===t.type?h.toP():h},h.prototype._wnafMulAdd=function(t,e,r,i,n){var o,h,u,f=this._wnafT1,l=this._wnafT2,c=this._wnafT3,d=0;for(o=0;o<i;o++){var p=(u=e[o])._getNAFPoints(t);f[o]=p.wnd,l[o]=p.points}for(o=i-1;o>=1;o-=2){var m=o-1,g=o;if(1===f[m]&&1===f[g]){var y=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(y[1]=e[m].add(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].add(e[g].neg())):(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=s(r[m],r[g]);for(d=Math.max(b[0].length,d),c[m]=new Array(d),c[g]=new Array(d),h=0;h<d;h++){var w=0|b[0][h],M=0|b[1][h];c[m][h]=v[3*(w+1)+(M+1)],c[g][h]=0,l[m]=y}}else c[m]=a(r[m],f[m],this._bitLength),c[g]=a(r[g],f[g],this._bitLength),d=Math.max(c[m].length,d),d=Math.max(c[g].length,d)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(o=d;o>=0;o--){for(var E=0;o>=0;){var C=!0;for(h=0;h<i;h++)S[h]=0|c[h][o],0!==S[h]&&(C=!1);if(!C)break;E++,o--}if(o>=0&&E++,_=_.dblp(E),o<0)break;for(h=0;h<i;h++){var A=S[h];0!==A&&(A>0?u=l[h][A-1>>1]:A<0&&(u=l[h][-A-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(o=0;o<i;o++)l[o]=null;return n?_:_.toP()},h.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},h.prototype.decodePoint=function(t,e){t=n.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?o(t[t.length-1]%2==0):7===t[0]&&o(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},u.prototype.encode=function(t,e){return n.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<e;n+=t){for(var a=0;a<t;a++)i=i.dbl();r.push(i)}return{step:t,points:r}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)e[n]=e[n-1].add(i);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},6708:(t,e,r)=>{"use strict";var i,n=r(5606);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=C,C.WritableState=E;var s,o={deprecate:r(4643)},h=r(345),u=r(8287).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(5896),c=r(5291).getHighWaterMark,d=r(6048).F,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,M=d.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;function S(){}function E(t,e,s){i=i||r(5382),t=t||{},"boolean"!=typeof s&&(s=e instanceof i),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=c(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,a=r.writecb;if("function"!=typeof a)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,a){--e.pendingcb,r?(n.nextTick(a,i),n.nextTick(R,t,e),t._writableState.errorEmitted=!0,_(t,i)):(a(i),t._writableState.errorEmitted=!0,_(t,i),R(t,e))}(t,r,i,e,a);else{var s=I(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),i?n.nextTick(T,t,r,s,a):T(t,r,s,a)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function C(t){var e=this instanceof(i=i||r(5382));if(!e&&!s.call(C,this))return new C(t);this._writableState=new E(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function A(t,e,r,i,n,a,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new v("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function T(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),R(t,e)}function B(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,h=!0;r;)n[o]=r,r.isBuf||(h=!1),r=r.next,o+=1;n.allBuffers=h,A(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(A(t,e,!1,e.objectMode?1:u.length,u,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(r){e.pendingcb--,r&&_(t,r),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var r=I(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(6698)(C,h),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===C&&t&&t._writableState instanceof E}})):s=function(t){return t instanceof this},C.prototype.pipe=function(){_(this,new y)},C.prototype.write=function(t,e,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=t,u.isBuffer(i)||i instanceof f);return o&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof r&&(r=S),a.ending?function(t,e){var r=new w;_(t,r),n.nextTick(e,r)}(this,r):(o||function(t,e,r,i){var a;return null===r?a=new b:"string"==typeof r||e.objectMode||(a=new p("chunk",["string","Buffer"],r)),!a||(_(t,a),n.nextTick(i,a),!1)}(this,a,t,r))&&(a.pendingcb++,s=function(t,e,r,i,n,a){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r)),e}(e,i,n);i!==s&&(r=!0,n="buffer",i=s)}var o=e.objectMode?1:i.length;e.length+=o;var h=e.length<e.highWaterMark;if(h||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else A(t,e,!1,o,i,n,a);return h}(this,a,o,t,e,r)),s},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||B(this,t))},C.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new M(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(t,e,r){r(new m("_write()"))},C.prototype._writev=null,C.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,R(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),C.prototype.destroy=l.destroy,C.prototype._undestroy=l.undestroy,C.prototype._destroy=function(t,e){e(t)}},6710:(t,e,r)=>{var i=r(6698),n=r(4107),a=r(392),s=r(2861).Buffer,o=new Array(64);function h(){this.init(),this._w=o,a.call(this,64,56)}i(h,n),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=h},6729:(t,e,r)=>{"use strict";var i=e;i.version=r(1636).rE,i.utils=r(7011),i.rand=r(5037),i.curve=r(894),i.curves=r(480),i.ec=r(7447),i.eddsa=r(8650)},6737:(t,e,r)=>{(e=t.exports=r(206)).Stream=e,e.Readable=e,e.Writable=r(7314),e.Duplex=r(6248),e.Transform=r(1816),e.PassThrough=r(5242)},6784:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=i.rotl32,s=i.sum32,o=i.sum32_3,h=i.sum32_4,u=n.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function c(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}i.inherits(f,u),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],i=this.h[1],n=this.h[2],u=this.h[3],f=this.h[4],v=r,b=i,w=n,M=u,_=f,S=0;S<80;S++){var E=s(a(h(r,l(S,i,n,u),t[p[S]+e],c(S)),g[S]),f);r=f,f=u,u=a(n,10),n=i,i=E,E=s(a(h(v,l(79-S,b,w,M),t[m[S]+e],d(S)),y[S]),_),v=_,_=M,M=a(w,10),w=b,b=E}E=o(this.h[1],n,M),this.h[1]=o(this.h[2],u,_),this.h[2]=o(this.h[3],f,v),this.h[3]=o(this.h[4],r,b),this.h[4]=o(this.h[0],i,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var p=[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],m=[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],g=[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],y=[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]},6843:(t,e,r)=>{var i=r(8287).Buffer,n=r(295);function a(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=i.concat([t._cache,a(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,r)}},6975:(t,e,r)=>{var i=r(2861).Buffer;function n(t,e,r){var n=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=i.concat([t._prev.slice(1),i.from([r?e:n])]),n}e.encrypt=function(t,e,r){for(var a=e.length,s=i.allocUnsafe(a),o=-1;++o<a;)s[o]=n(t,e[o],r);return s}},6983:(t,e,r)=>{"use strict";var i=r(5606);function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=r(2861),s=r(3209),o=a.Buffer,h=a.kMaxLength,u=r.g.crypto||r.g.msCrypto,f=Math.pow(2,32)-1;function l(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>h||t>e)throw new RangeError("offset out of range")}function c(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>h)throw new RangeError("buffer too small")}function d(t,e,r,n){if(i.browser){var a=t.buffer,o=new Uint8Array(a,e,r);return u.getRandomValues(o),n?void i.nextTick((function(){n(null,t)})):t}if(!n)return s(r).copy(t,e),t;s(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}u&&u.getRandomValues||!i.browser?(e.randomFill=function(t,e,i,n){if(!(o.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)n=e,e=0,i=t.length;else if("function"==typeof i)n=i,i=t.length-e;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return l(e,t.length),c(i,e,t.length),d(t,e,i,n)},e.randomFillSync=function(t,e,i){if(void 0===e&&(e=0),!(o.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return l(e,t.length),void 0===i&&(i=t.length-e),c(i,e,t.length),d(t,e,i)}):(e.randomFill=n,e.randomFillSync=n)},7007:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,i){function n(r){t.removeListener(e,a),i(r)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",n),r([].slice.call(arguments))}m(t,e,a,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,n)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function h(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,r,i){var n,a,s,u;if(o(r),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),s=a[e]),void 0===s)s=a[e]=r,++t._eventsCount;else if("function"==typeof s?s=a[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=h(t))>0&&s.length>n&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,u=f,console&&console.warn&&console.warn(u)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=f.bind(i);return n.listener=r,i.wrapFn=n,n}function c(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):p(n,n.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function m(t,e,r,i){if("function"==typeof t.on)i.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function n(a){i.once&&t.removeEventListener(e,n),r(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||n(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||n(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return h(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,a=this._events;if(void 0!==a)n=n&&void 0===a.error;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var h=a[t];if(void 0===h)return!1;if("function"==typeof h)i(h,this,e);else{var u=h.length,f=p(h,u);for(r=0;r<u;++r)i(f[r],this,e)}return!0},a.prototype.addListener=function(t,e){return u(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return u(this,t,e,!0)},a.prototype.once=function(t,e){return o(e),this.on(t,l(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return o(e),this.prependListener(t,l(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,i,n,a,s;if(o(e),void 0===(i=this._events))return this;if(void 0===(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(n=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){s=r[a].listener,n=a;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n),1===r.length&&(i[t]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var n,a=Object.keys(r);for(i=0;i<a.length;++i)"removeListener"!==(n=a[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return c(this,t,!0)},a.prototype.rawListeners=function(t){return c(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},7011:(t,e,r)=>{"use strict";var i=e,n=r(8490),a=r(3349),s=r(4367);i.assert=a,i.toArray=s.toArray,i.zero2=s.zero2,i.toHex=s.toHex,i.encode=s.encode,i.getNAF=function(t,e,r){var i,n=new Array(Math.max(t.bitLength(),r)+1);for(i=0;i<n.length;i+=1)n[i]=0;var a=1<<e+1,s=t.clone();for(i=0;i<n.length;i++){var o,h=s.andln(a-1);s.isOdd()?(o=h>(a>>1)-1?(a>>1)-h:h,s.isubn(o)):o=0,n[i]=o,s.iushrn(1)}return n},i.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i,n=0,a=0;t.cmpn(-n)>0||e.cmpn(-a)>0;){var s,o,h=t.andln(3)+n&3,u=e.andln(3)+a&3;3===h&&(h=-1),3===u&&(u=-1),s=1&h?3!=(i=t.andln(7)+n&7)&&5!==i||2!==u?h:-h:0,r[0].push(s),o=1&u?3!=(i=e.andln(7)+a&7)&&5!==i||2!==h?u:-u:0,r[1].push(o),2*n===s+1&&(n=1-n),2*a===o+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return r},i.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(t){return"string"==typeof t?i.toArray(t,"hex"):t},i.intFromLE=function(t){return new n(t,"hex","le")}},7108:(t,e,r)=>{"use strict";var i=r(6698),n=r(8276),a=r(6011),s=r(2802),o=r(6168);function h(t){o.call(this,"digest"),this._hash=t}i(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new n:"rmd160"===t||"ripemd160"===t?new a:new h(s(t))}},7168:(t,e,r)=>{e.publicEncrypt=r(8902),e.privateDecrypt=r(7362),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},7227:(t,e,r)=>{var i=r(6698),n=r(9673).Reporter,a=r(8287).Buffer;function s(t,e){n.call(this,e),a.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function o(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof o||(t=new o(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=a.byteLength(t);else{if(!a.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}i(s,n),e.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,n.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.d=o,o.prototype.join=function(t,e){return t||(t=new a(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):a.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},7314:(t,e,r)=>{"use strict";var i=r(5606),n=r(3225);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=y;var s,o=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?setImmediate:n.nextTick;y.WritableState=g;var h=Object.create(r(5622));h.inherits=r(6698);var u,f={deprecate:r(4643)},l=r(5567),c=r(4116).Buffer,d=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},p=r(6278);function m(){}function g(t,e){s=s||r(6248),t=t||{};var i=e instanceof s;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var h=t.highWaterMark,u=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=h||0===h?h:i&&(u||0===u)?u:f,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 l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,a=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,a){--e.pendingcb,r?(n.nextTick(a,i),n.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(a(i),t._writableState.errorEmitted=!0,t.emit("error",i),S(t,e))}(t,r,i,e,a);else{var s=M(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),i?o(b,t,r,s,a):b(t,r,s,a)}}(e,t)},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 a(this)}function y(t){if(s=s||r(6248),!(u.call(y,this)||this instanceof s))return new y(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function v(t,e,r,i,n,a,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function b(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,h=!0;r;)n[o]=r,r.isBuf||(h=!1),r=r.next,o+=1;n.allBuffers=h,v(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(v(t,e,!1,e.objectMode?1:u.length,u,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function _(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var r=M(e);return r&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,n.nextTick(_,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}h.inherits(y,l),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!u.call(this,t)||this===y&&t&&t._writableState instanceof g}})):u=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=t,c.isBuffer(i)||i instanceof d);return o&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof r&&(r=m),a.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),n.nextTick(e,r)}(this,r):(o||function(t,e,r,i){var a=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),n.nextTick(i,s),a=!1),a}(this,a,t,r))&&(a.pendingcb++,s=function(t,e,r,i,n,a){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r)),e}(e,i,n);i!==s&&(r=!0,n="buffer",i=s)}var o=e.objectMode?1:i.length;e.length+=o;var h=e.length<e.highWaterMark;if(h||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,o,i,n,a);return h}(this,a,o,t,e,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}},7332:(t,e,r)=>{"use strict";var i=r(9404),n=r(3209),a=r(2861).Buffer;function s(t){var e,r=t.modulus.byteLength();do{e=new i(n(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function o(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),n=e.modulus.byteLength(),o=new i(t).mul(r.blinder).umod(e.modulus),h=o.toRed(i.mont(e.prime1)),u=o.toRed(i.mont(e.prime2)),f=e.coefficient,l=e.prime1,c=e.prime2,d=h.redPow(e.exponent1).fromRed(),p=u.redPow(e.exponent2).fromRed(),m=d.isub(p).imul(f).umod(l).imul(c);return p.iadd(m).imul(r.unblinder).umod(e.modulus).toArrayLike(a,"be",n)}o.getr=s,t.exports=o},7362:(t,e,r)=>{var i=r(8170),n=r(8206),a=r(2061),s=r(2509),o=r(7332),h=r(7108),u=r(9247),f=r(2861).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var c,d=i(t),p=d.modulus.byteLength();if(e.length>p||new s(e).cmp(d.modulus)>=0)throw new Error("decryption error");c=r?u(new s(e),d):o(e,d);var m=f.alloc(p-c.length);if(c=f.concat([m,c],p),4===l)return function(t,e){var r=t.modulus.byteLength(),i=h("sha1").update(f.alloc(0)).digest(),s=i.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,s+1),u=e.slice(s+1),l=a(o,n(u,s)),c=a(u,n(l,r-s-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var n=-1;++n<i;)r+=t[n]^e[n];return r}(i,c.slice(0,s)))throw new Error("decryption error");for(var d=s;0===c[d];)d++;if(1!==c[d++])throw new Error("decryption error");return c.slice(d)}(d,c);if(1===l)return function(t,e,r){for(var i=e.slice(0,2),n=2,a=0;0!==e[n++];)if(n>=e.length){a++;break}var s=e.slice(2,n-1);if(("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&a++,s.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}(0,c,r);if(3===l)return c;throw new Error("unknown padding")}},7363:(t,e,r)=>{var i=r(7568),n=r(6698);function a(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new a(t,e)},a.prototype._createNamed=function(t){var e;try{e=r(8961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return n(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i.decoders[t])),this.decoders[t]},a.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(i.encoders[t])),this.encoders[t]},a.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},7426:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698);function a(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=n,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var i=0,n=0;n<t.length;n++){var s=t.charCodeAt(n);s<128?r[i++]=s:s<2048?(r[i++]=s>>6|192,r[i++]=63&s|128):a(t,n)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++n)),r[i++]=s>>18|240,r[i++]=s>>12&63|128,r[i++]=s>>6&63|128,r[i++]=63&s|128):(r[i++]=s>>12|224,r[i++]=s>>6&63|128,r[i++]=63&s|128)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=o(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];"little"===e&&(n=s(n)),r+=h(n.toString(16))}return r},e.zero2=o,e.zero8=h,e.join32=function(t,e,r,n){var a=r-e;i(a%4==0);for(var s=new Array(a/4),o=0,h=e;o<s.length;o++,h+=4){var u;u="big"===n?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],s[o]=u>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),i=0,n=0;i<t.length;i++,n+=4){var a=t[i];"big"===e?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=255&a):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=255&a)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},e.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},e.sum64=function(t,e,r,i){var n=t[e],a=i+t[e+1]>>>0,s=(a<i?1:0)+r+n;t[e]=s>>>0,t[e+1]=a},e.sum64_hi=function(t,e,r,i){return(e+i>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,i){return e+i>>>0},e.sum64_4_hi=function(t,e,r,i,n,a,s,o){var h=0,u=e;return h+=(u=u+i>>>0)<e?1:0,h+=(u=u+a>>>0)<a?1:0,t+r+n+s+(h+=(u=u+o>>>0)<o?1:0)>>>0},e.sum64_4_lo=function(t,e,r,i,n,a,s,o){return e+i+a+o>>>0},e.sum64_5_hi=function(t,e,r,i,n,a,s,o,h,u){var f=0,l=e;return f+=(l=l+i>>>0)<e?1:0,f+=(l=l+a>>>0)<a?1:0,f+=(l=l+o>>>0)<o?1:0,t+r+n+s+h+(f+=(l=l+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,r,i,n,a,s,o,h,u){return e+i+a+o+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},7447:(t,e,r)=>{"use strict";var i=r(8490),n=r(2723),a=r(7011),s=r(480),o=r(5037),h=a.assert,u=r(1200),f=r(8545);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(h(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new u(this,t)},l.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new n({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new i(2));;){var s=new i(e.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},l.prototype._truncateToN=function(t,e,r){var n;if(i.isBN(t)||"number"==typeof t)n=(t=new i(t,16)).byteLength();else if("object"==typeof t)n=t.length,t=new i(t,16);else{var a=t.toString();n=a.length+1>>>1,t=new i(a,16)}"number"!=typeof r&&(r=8*n);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,r,a){if("object"==typeof r&&(a=r,r=null),a||(a={}),"string"!=typeof t&&"number"!=typeof t&&!i.isBN(t)){h("object"==typeof t&&t&&"number"==typeof t.length,"Expected message to be an array-like, a hex string, or a BN instance"),h(t.length>>>0===t.length);for(var s=0;s<t.length;s++)h((255&t[s])===t[s])}e=this.keyFromPrivate(e,r),t=this._truncateToN(t,!1,a.msgBitLength),h(!t.isNeg(),"Can not sign a negative message");var o=this.n.byteLength(),u=e.getPrivate().toArray("be",o),l=t.toArray("be",o);h(new i(l).eq(t),"Can not sign message");for(var c=new n({hash:this.hash,entropy:u,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new i(1)),p=0;;p++){var m=a.k?a.k(p):new i(c.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(d)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var y=g.getX(),v=y.umod(this.n);if(0!==v.cmpn(0)){var b=m.invm(this.n).mul(v.mul(e.getPrivate()).iadd(t));if(0!==(b=b.umod(this.n)).cmpn(0)){var w=(g.getY().isOdd()?1:0)|(0!==y.cmp(v)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),w^=1),new f({r:v,s:b,recoveryParam:w})}}}}}},l.prototype.verify=function(t,e,r,i,n){n||(n={}),t=this._truncateToN(t,!1,n.msgBitLength),r=this.keyFromPublic(r,i);var a=(e=new f(e,"hex")).r,s=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,h=s.invm(this.n),u=h.mul(t).umod(this.n),l=h.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},l.prototype.recoverPubKey=function(t,e,r,n){h((3&r)===r,"The recovery param is more than two bits"),e=new f(e,n);var a=this.n,s=new i(t),o=e.r,u=e.s,l=1&r,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),l):this.curve.pointFromX(o,l);var d=e.r.invm(a),p=a.sub(s).mul(d).umod(a),m=u.mul(d).umod(a);return this.g.mulAdd(p,o,m)},l.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new f(e,i)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(t,e,n)}catch(t){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},7501:(t,e,r)=>{var i=r(276);r(7619),r(9356),r(1598);var n=t.exports=i.pkcs1=i.pkcs1||{};function a(t,e,r){r||(r=i.md.sha1.create());for(var n="",a=Math.ceil(e/r.digestLength),s=0;s<a;++s){var o=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(t+o),n+=r.digest().getBytes()}return n.substring(0,e)}n.encode_rsa_oaep=function(t,e,r){var n,s,o,h;"string"==typeof r?(n=r,s=arguments[3]||void 0,o=arguments[4]||void 0):r&&(n=r.label||void 0,s=r.seed||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(h=r.mgf1.md)),o?o.start():o=i.md.sha1.create(),h||(h=o);var u=Math.ceil(t.n.bitLength()/8),f=u-2*o.digestLength-2;if(e.length>f)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=e.length,g.maxLength=f,g;n||(n=""),o.update(n,"raw");for(var l=o.digest(),c="",d=f-e.length,p=0;p<d;p++)c+="\0";var m=l.getBytes()+c+""+e;if(s){if(s.length!==o.digestLength){var g;throw(g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=s.length,g.digestLength=o.digestLength,g}}else s=i.random.getBytes(o.digestLength);var y=a(s,u-o.digestLength-1,h),v=i.util.xorBytes(m,y,m.length),b=a(v,o.digestLength,h);return"\0"+i.util.xorBytes(s,b,s.length)+v},n.decode_rsa_oaep=function(t,e,r){var n,s,o;"string"==typeof r?(n=r,s=arguments[3]||void 0):r&&(n=r.label||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md));var h=Math.ceil(t.n.bitLength()/8);if(e.length!==h)throw(y=new Error("RSAES-OAEP encoded message length is invalid.")).length=e.length,y.expectedLength=h,y;if(void 0===s?s=i.md.sha1.create():s.start(),o||(o=s),h<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),s.update(n,"raw");for(var u=s.digest().getBytes(),f=e.charAt(0),l=e.substring(1,s.digestLength+1),c=e.substring(1+s.digestLength),d=a(c,s.digestLength,o),p=a(i.util.xorBytes(l,d,l.length),h-s.digestLength-1,o),m=i.util.xorBytes(c,p,c.length),g=m.substring(0,s.digestLength),y="\0"!==f,v=0;v<s.digestLength;++v)y|=u.charAt(v)!==g.charAt(v);for(var b=1,w=s.digestLength,M=s.digestLength;M<m.length;M++){var _=m.charCodeAt(M);y|=_&(b?65534:0),w+=b&=1&_^1}if(y||1!==m.charCodeAt(w))throw new Error("Invalid RSAES-OAEP padding.");return m.substring(w+1)}},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=o(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,a=o(t),s=a[0],h=a[1],u=new n(function(t,e,r){return 3*(e+r)/4-r}(0,s,h)),f=0,l=h>0?s-4:s;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===h&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===h&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,a=[],s=16383,o=0,u=i-n;o<u;o+=s)a.push(h(t,o,o+s>u?u:o+s));return 1===n?(e=t[i-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function o(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,i){for(var n,a,s=[],o=e;o<i;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),s.push(r[(a=n)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},7568:(t,e,r)=>{var i=e;i.bignum=r(2344),i.define=r(7363).define,i.base=r(9673),i.constants=r(2153),i.decoders=r(2853),i.encoders=r(4669)},7619:(t,e,r)=>{var i=r(5606),n=r(8287).Buffer,a=r(276),s=r(4058),o=t.exports=a.util=a.util||{};function h(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}function u(t){if(this.data="",this.read=0,"string"==typeof t)this.data=t;else if(o.isArrayBuffer(t)||o.isArrayBufferView(t))if(void 0!==n&&t instanceof n)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(t){for(var r=0;r<e.length;++r)this.putByte(e[r])}}else(t instanceof u||"object"==typeof t&&"string"==typeof t.data&&"number"==typeof t.read)&&(this.data=t.data,this.read=t.read);this._constructedStringLength=0}!function(){if(void 0!==i&&i.nextTick&&!i.browser)return o.nextTick=i.nextTick,void("function"==typeof setImmediate?o.setImmediate=setImmediate:o.setImmediate=o.nextTick);if("function"==typeof setImmediate)return o.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(o.nextTick=function(t){return setImmediate(t)});if(o.setImmediate=function(t){setTimeout(t,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var t="forge.setImmediate",e=[];o.setImmediate=function(r){e.push(r),1===e.length&&window.postMessage(t,"*")},window.addEventListener("message",(function(r){if(r.source===window&&r.data===t){r.stopPropagation();var i=e.slice();e.length=0,i.forEach((function(t){t()}))}}),!0)}if("undefined"!=typeof MutationObserver){var r=Date.now(),n=!0,a=document.createElement("div");e=[],new MutationObserver((function(){var t=e.slice();e.length=0,t.forEach((function(t){t()}))})).observe(a,{attributes:!0});var s=o.setImmediate;o.setImmediate=function(t){Date.now()-r>15?(r=Date.now(),s(t)):(e.push(t),1===e.length&&a.setAttribute("a",n=!n))}}o.nextTick=o.setImmediate}(),o.isNodejs=void 0!==i&&i.versions&&i.versions.node,o.globalScope=o.isNodejs?r.g:"undefined"==typeof self?window:self,o.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},o.isArrayBufferView=function(t){return t&&o.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},o.ByteBuffer=u,o.ByteStringBuffer=u,o.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},o.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},o.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},o.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},o.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this},o.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},o.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(o.encodeUtf8(t))},o.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},o.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},o.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},o.ByteStringBuffer.prototype.putInt=function(t,e){h(e);var r="";do{e-=8,r+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(r)},o.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<<e-1),this.putInt(t,e)},o.ByteStringBuffer.prototype.putBuffer=function(t){return this.putBytes(t.getBytes())},o.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},o.ByteStringBuffer.prototype.getInt16=function(){var t=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,t},o.ByteStringBuffer.prototype.getInt24=function(){var t=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,t},o.ByteStringBuffer.prototype.getInt32=function(){var t=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,t},o.ByteStringBuffer.prototype.getInt16Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,t},o.ByteStringBuffer.prototype.getInt24Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,t},o.ByteStringBuffer.prototype.getInt32Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,t},o.ByteStringBuffer.prototype.getInt=function(t){h(t);var e=0;do{e=(e<<8)+this.data.charCodeAt(this.read++),t-=8}while(t>0);return e},o.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<<t-2;return e>=r&&(e-=r<<1),e},o.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.ByteStringBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},o.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},o.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},o.ByteStringBuffer.prototype.copy=function(){var t=o.createBuffer(this.data);return t.read=this.read,t},o.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},o.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},o.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},o.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.length;++e){var r=this.data.charCodeAt(e);r<16&&(t+="0"),t+=r.toString(16)}return t},o.ByteStringBuffer.prototype.toString=function(){return o.decodeUtf8(this.bytes())},o.DataBuffer=function(t,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var r=o.isArrayBuffer(t),i=o.isArrayBufferView(t);if(r||i)return this.data=r?new DataView(t):new DataView(t.buffer,t.byteOffset,t.byteLength),void(this.write="writeOffset"in e?e.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=t&&this.putBytes(t),"writeOffset"in e&&(this.write=e.writeOffset)},o.DataBuffer.prototype.length=function(){return this.write-this.read},o.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},o.DataBuffer.prototype.accommodate=function(t,e){if(this.length()>=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),i=new Uint8Array(this.length()+e);return i.set(r),this.data=new DataView(i.buffer),this},o.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},o.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r<e;++r)this.data.setUint8(t);return this},o.DataBuffer.prototype.putBytes=function(t,e){if(o.isArrayBufferView(t)){var r=(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).byteLength-i.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(i),this.write+=r,this}if(o.isArrayBuffer(t)){var i=new Uint8Array(t);return this.accommodate(i.byteLength),new Uint8Array(this.data.buffer).set(i,this.write),this.write+=i.byteLength,this}if(t instanceof o.DataBuffer||"object"==typeof t&&"number"==typeof t.read&&"number"==typeof t.write&&o.isArrayBufferView(t.data))return i=new Uint8Array(t.data.byteLength,t.read,t.length()),this.accommodate(i.byteLength),new Uint8Array(t.data.byteLength,this.write).set(i),this.write+=i.byteLength,this;if(t instanceof o.ByteStringBuffer&&(t=t.data,e="binary"),e=e||"binary","string"==typeof t){var n;if("hex"===e)return this.accommodate(Math.ceil(t.length/2)),n=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.hex.decode(t,n,this.write),this;if("base64"===e)return this.accommodate(3*Math.ceil(t.length/4)),n=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.base64.decode(t,n,this.write),this;if("utf8"===e&&(t=o.encodeUtf8(t),e="binary"),"binary"===e||"raw"===e)return this.accommodate(t.length),n=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.raw.decode(n),this;if("utf16"===e)return this.accommodate(2*t.length),n=new Uint16Array(this.data.buffer,this.write),this.write+=o.text.utf16.encode(n),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+t)},o.DataBuffer.prototype.putBuffer=function(t){return this.putBytes(t),t.clear(),this},o.DataBuffer.prototype.putString=function(t){return this.putBytes(t,"utf16")},o.DataBuffer.prototype.putInt16=function(t){return this.accommodate(2),this.data.setInt16(this.write,t),this.write+=2,this},o.DataBuffer.prototype.putInt24=function(t){return this.accommodate(3),this.data.setInt16(this.write,t>>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},o.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},o.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},o.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},o.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},o.DataBuffer.prototype.putInt=function(t,e){h(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},o.DataBuffer.prototype.putSignedInt=function(t,e){return h(e),this.accommodate(e/8),t<0&&(t+=2<<e-1),this.putInt(t,e)},o.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},o.DataBuffer.prototype.getInt16=function(){var t=this.data.getInt16(this.read);return this.read+=2,t},o.DataBuffer.prototype.getInt24=function(){var t=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,t},o.DataBuffer.prototype.getInt32=function(){var t=this.data.getInt32(this.read);return this.read+=4,t},o.DataBuffer.prototype.getInt16Le=function(){var t=this.data.getInt16(this.read,!0);return this.read+=2,t},o.DataBuffer.prototype.getInt24Le=function(){var t=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,t},o.DataBuffer.prototype.getInt32Le=function(){var t=this.data.getInt32(this.read,!0);return this.read+=4,t},o.DataBuffer.prototype.getInt=function(t){h(t);var e=0;do{e=(e<<8)+this.data.getInt8(this.read++),t-=8}while(t>0);return e},o.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<<t-2;return e>=r&&(e-=r<<1),e},o.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.DataBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},o.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},o.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},o.DataBuffer.prototype.copy=function(){return new o.DataBuffer(this)},o.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},o.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},o.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},o.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.byteLength;++e){var r=this.data.getUint8(e);r<16&&(t+="0"),t+=r.toString(16)}return t},o.DataBuffer.prototype.toString=function(t){var e=new Uint8Array(this.data,this.read,this.length());if("binary"===(t=t||"utf8")||"raw"===t)return o.binary.raw.encode(e);if("hex"===t)return o.binary.hex.encode(e);if("base64"===t)return o.binary.base64.encode(e);if("utf8"===t)return o.text.utf8.decode(e);if("utf16"===t)return o.text.utf16.decode(e);throw new Error("Invalid encoding: "+t)},o.createBuffer=function(t,e){return e=e||"raw",void 0!==t&&"utf8"===e&&(t=o.encodeUtf8(t)),new o.ByteBuffer(t)},o.fillString=function(t,e){for(var r="";e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return r},o.xorBytes=function(t,e,r){for(var i="",n="",a="",s=0,o=0;r>0;--r,++s)n=t.charCodeAt(s)^e.charCodeAt(s),o>=10&&(i+=a,a="",o=0),a+=String.fromCharCode(n),++o;return i+a},o.hexToBytes=function(t){var e="",r=0;for(!0&t.length&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r<t.length;r+=2)e+=String.fromCharCode(parseInt(t.substr(r,2),16));return e},o.bytesToHex=function(t){return o.createBuffer(t).toHex()},o.int32ToBytes=function(t){return String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],c="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";o.encode64=function(t,e){for(var r,i,n,a="",s="",o=0;o<t.length;)r=t.charCodeAt(o++),i=t.charCodeAt(o++),n=t.charCodeAt(o++),a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|i>>4),isNaN(i)?a+="==":(a+=f.charAt((15&i)<<2|n>>6),a+=isNaN(n)?"=":f.charAt(63&n)),e&&a.length>e&&(s+=a.substr(0,e)+"\r\n",a=a.substr(e));return s+a},o.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,r,i,n,a="",s=0;s<t.length;)e=l[t.charCodeAt(s++)-43],r=l[t.charCodeAt(s++)-43],i=l[t.charCodeAt(s++)-43],n=l[t.charCodeAt(s++)-43],a+=String.fromCharCode(e<<2|r>>4),64!==i&&(a+=String.fromCharCode((15&r)<<4|i>>2),64!==n&&(a+=String.fromCharCode((3&i)<<6|n)));return a},o.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},o.decodeUtf8=function(t){return decodeURIComponent(escape(t))},o.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},o.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},o.binary.raw.decode=function(t,e,r){var i=e;i||(i=new Uint8Array(t.length));for(var n=r=r||0,a=0;a<t.length;++a)i[n++]=t.charCodeAt(a);return e?n-r:i},o.binary.hex.encode=o.bytesToHex,o.binary.hex.decode=function(t,e,r){var i=e;i||(i=new Uint8Array(Math.ceil(t.length/2)));var n=0,a=r=r||0;for(1&t.length&&(n=1,i[a++]=parseInt(t[0],16));n<t.length;n+=2)i[a++]=parseInt(t.substr(n,2),16);return e?a-r:i},o.binary.base64.encode=function(t,e){for(var r,i,n,a="",s="",o=0;o<t.byteLength;)r=t[o++],i=t[o++],n=t[o++],a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|i>>4),isNaN(i)?a+="==":(a+=f.charAt((15&i)<<2|n>>6),a+=isNaN(n)?"=":f.charAt(63&n)),e&&a.length>e&&(s+=a.substr(0,e)+"\r\n",a=a.substr(e));return s+a},o.binary.base64.decode=function(t,e,r){var i,n,a,s,o=e;o||(o=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var h=0,u=r=r||0;h<t.length;)i=l[t.charCodeAt(h++)-43],n=l[t.charCodeAt(h++)-43],a=l[t.charCodeAt(h++)-43],s=l[t.charCodeAt(h++)-43],o[u++]=i<<2|n>>4,64!==a&&(o[u++]=(15&n)<<4|a>>2,64!==s&&(o[u++]=(3&a)<<6|s));return e?u-r:o.subarray(0,u)},o.binary.base58.encode=function(t,e){return o.binary.baseN.encode(t,c,e)},o.binary.base58.decode=function(t,e){return o.binary.baseN.decode(t,c,e)},o.text={utf8:{},utf16:{}},o.text.utf8.encode=function(t,e,r){t=o.encodeUtf8(t);var i=e;i||(i=new Uint8Array(t.length));for(var n=r=r||0,a=0;a<t.length;++a)i[n++]=t.charCodeAt(a);return e?n-r:i},o.text.utf8.decode=function(t){return o.decodeUtf8(String.fromCharCode.apply(null,t))},o.text.utf16.encode=function(t,e,r){var i=e;i||(i=new Uint8Array(2*t.length));for(var n=new Uint16Array(i.buffer),a=r=r||0,s=r,o=0;o<t.length;++o)n[s++]=t.charCodeAt(o),a+=2;return e?a-r:i},o.text.utf16.decode=function(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))},o.deflate=function(t,e,r){if(e=o.decode64(t.deflate(o.encode64(e)).rval),r){var i=2;32&e.charCodeAt(1)&&(i=6),e=e.substring(i,e.length-4)}return e},o.inflate=function(t,e,r){var i=t.inflate(o.encode64(e)).rval;return null===i?null:o.decode64(i)};var d=function(t,e,r){if(!t)throw new Error("WebStorage not available.");var i;if(null===r?i=t.removeItem(e):(r=o.encode64(JSON.stringify(r)),i=t.setItem(e,r)),void 0!==i&&!0!==i.rval){var n=new Error(i.error.message);throw n.id=i.error.id,n.name=i.error.name,n}},p=function(t,e){if(!t)throw new Error("WebStorage not available.");var r=t.getItem(e);if(t.init)if(null===r.rval){if(r.error){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(o.decode64(r))),r},m=function(t,e,r,i){var n=p(t,e);null===n&&(n={}),n[r]=i,d(t,e,n)},g=function(t,e,r){var i=p(t,e);return null!==i&&(i=r in i?i[r]:null),i},y=function(t,e,r){var i=p(t,e);if(null!==i&&r in i){delete i[r];var n=!0;for(var a in i){n=!1;break}n&&(i=null),d(t,e,i)}},v=function(t,e){d(t,e,null)},b=function(t,e,r){var i,n=null;void 0===r&&(r=["web","flash"]);var a=!1,s=null;for(var o in r){i=r[o];try{if("flash"===i||"both"===i){if(null===e[0])throw new Error("Flash local storage not available.");n=t.apply(this,e),a="flash"===i}"web"!==i&&"both"!==i||(e[0]=localStorage,n=t.apply(this,e),a=!0)}catch(t){s=t}if(a)break}if(!a)throw s;return n};o.setItem=function(t,e,r,i,n){b(m,arguments,n)},o.getItem=function(t,e,r,i){return b(g,arguments,i)},o.removeItem=function(t,e,r,i){b(y,arguments,i)},o.clearItems=function(t,e,r){b(v,arguments,r)},o.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},o.format=function(t){for(var e,r,i=/%./g,n=0,a=[],s=0;e=i.exec(t);){(r=t.substring(s,i.lastIndex-2)).length>0&&a.push(r),s=i.lastIndex;var o=e[0][1];switch(o){case"s":case"o":n<arguments.length?a.push(arguments[1+n++]):a.push("<?>");break;case"%":a.push("%");break;default:a.push("<%"+o+"?>")}}return a.push(t.substring(s)),a.join("")},o.formatNumber=function(t,e,r,i){var n=t,a=isNaN(e=Math.abs(e))?2:e,s=void 0===r?",":r,o=void 0===i?".":i,h=n<0?"-":"",u=parseInt(n=Math.abs(+n||0).toFixed(a),10)+"",f=u.length>3?u.length%3:0;return h+(f?u.substr(0,f)+o:"")+u.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+o)+(a?s+Math.abs(n-u).toFixed(a).slice(2):"")},o.formatSize=function(t){return t>=1073741824?o.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?o.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?o.formatNumber(t/1024,0)+" KiB":o.formatNumber(t,0)+" bytes"},o.bytesFromIP=function(t){return-1!==t.indexOf(".")?o.bytesFromIPv4(t):-1!==t.indexOf(":")?o.bytesFromIPv6(t):null},o.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=o.createBuffer(),r=0;r<t.length;++r){var i=parseInt(t[r],10);if(isNaN(i))return null;e.putByte(i)}return e.getBytes()},o.bytesFromIPv6=function(t){for(var e=0,r=2*(8-(t=t.split(":").filter((function(t){return 0===t.length&&++e,!0}))).length+e),i=o.createBuffer(),n=0;n<8;++n)if(t[n]&&0!==t[n].length){var a=o.hexToBytes(t[n]);a.length<2&&i.putByte(0),i.putBytes(a)}else i.fillWithByte(0,r),r=0;return i.getBytes()},o.bytesToIP=function(t){return 4===t.length?o.bytesToIPv4(t):16===t.length?o.bytesToIPv6(t):null},o.bytesToIPv4=function(t){if(4!==t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e.join(".")},o.bytesToIPv6=function(t){if(16!==t.length)return null;for(var e=[],r=[],i=0,n=0;n<t.length;n+=2){for(var a=o.bytesToHex(t[n]+t[n+1]);"0"===a[0]&&"0"!==a;)a=a.substr(1);if("0"===a){var s=r[r.length-1],h=e.length;s&&h===s.end+1?(s.end=h,s.end-s.start>r[i].end-r[i].start&&(i=r.length-1)):r.push({start:h,end:h})}e.push(a)}if(r.length>0){var u=r[i];u.end-u.start>0&&(e.splice(u.start,u.end-u.start+1,""),0===u.start&&e.unshift(""),7===u.end&&e.push(""))}return e.join(":")},o.estimateCores=function(t,e){if("function"==typeof t&&(e=t,t={}),t=t||{},"cores"in o&&!t.update)return e(null,o.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return o.cores=navigator.hardwareConcurrency,e(null,o.cores);if("undefined"==typeof Worker)return o.cores=1,e(null,o.cores);if("undefined"==typeof Blob)return o.cores=2,e(null,o.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(t){for(var e=Date.now(),r=e+4;Date.now()<r;);self.postMessage({st:e,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function t(i,n,a){if(0===n){var s=Math.floor(i.reduce((function(t,e){return t+e}),0)/i.length);return o.cores=Math.max(1,s),URL.revokeObjectURL(r),e(null,o.cores)}!function(t,e){for(var i=[],n=[],a=0;a<t;++a){var s=new Worker(r);s.addEventListener("message",(function(r){if(n.push(r.data),n.length===t){for(var a=0;a<t;++a)i[a].terminate();e(0,n)}})),i.push(s)}for(a=0;a<t;++a)i[a].postMessage(a)}(a,(function(e,r){i.push(function(t,e){for(var r=[],i=0;i<t;++i)for(var n=e[i],a=r[i]=[],s=0;s<t;++s)if(i!==s){var o=e[s];(n.st>o.st&&n.st<o.et||o.st>n.st&&o.st<n.et)&&a.push(s)}return r.reduce((function(t,e){return Math.max(t,e.length)}),0)}(a,r)),t(i,n-1,a)}))}([],5,16)}},7626:(t,e)=>{"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,i){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)n<<=1,n|=e>>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=t>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1}r[i+0]=n>>>0,r[i+1]=a>>>0},e.rip=function(t,e,r,i){for(var n=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)n<<=1,n|=e>>>o+s&1,n<<=1,n|=t>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=e>>>o+s&1,a<<=1,a|=t>>>o+s&1;r[i+0]=n>>>0,r[i+1]=a>>>0},e.pc1=function(t,e,r,i){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1}for(o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;r[i+0]=n>>>0,r[i+1]=a>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,i,n){for(var a=0,s=0,o=r.length>>>1,h=0;h<o;h++)a<<=1,a|=t>>>r[h]&1;for(h=o;h<r.length;h++)s<<=1,s|=e>>>r[h]&1;i[n+0]=a>>>0,i[n+1]=s>>>0},e.expand=function(t,e,r){var i=0,n=0;i=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=t>>>a&63;for(a=11;a>=3;a-=4)n|=t>>>a&63,n<<=6;n|=(31&t)<<1|t>>>31,e[r+0]=i>>>0,e[r+1]=n>>>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];e.substitute=function(t,e){for(var r=0,n=0;n<4;n++)r<<=4,r|=i[64*n+(t>>>18-6*n&63)];for(n=0;n<4;n++)r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)];return r>>>0};var n=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<n.length;r++)e<<=1,e|=t>>>n[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var i=t.toString(2);i.length<e;)i="0"+i;for(var n=[],a=0;a<e;a+=r)n.push(i.slice(a,a+r));return n.join(" ")}},7714:(t,e,r)=>{"use strict";var i=r(7426),n=r(2287);function a(){if(!(this instanceof a))return new a;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(a,n),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},7758:(t,e,r)=>{"use strict";var i,n=r(6048).F,a=n.ERR_MISSING_ARGS,s=n.ERR_STREAM_DESTROYED;function o(t){if(t)throw t}function h(t){t()}function u(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var f,l=function(t){return t.length?"function"!=typeof t[t.length-1]?o:t.pop():o}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a("streams");var c=e.map((function(t,n){var a=n<e.length-1;return function(t,e,n,a){a=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(a);var o=!1;t.on("close",(function(){o=!0})),void 0===i&&(i=r(6238)),i(t,{readable:e,writable:n},(function(t){if(t)return a(t);o=!0,a()}));var h=!1;return function(e){if(!o&&!h)return h=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new s("pipe"))}}(t,a,n>0,(function(t){f||(f=t),t&&c.forEach(h),a||(c.forEach(h),l(f))}))}));return e.reduce(u)}},7766:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=r(3349),s=i.rotr64_hi,o=i.rotr64_lo,h=i.shr64_hi,u=i.shr64_lo,f=i.sum64,l=i.sum64_hi,c=i.sum64_lo,d=i.sum64_4_hi,p=i.sum64_4_lo,m=i.sum64_5_hi,g=i.sum64_5_lo,y=n.BlockHash,v=[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];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(t,e,r,i,n){var a=t&r^~t&n;return a<0&&(a+=4294967296),a}function M(t,e,r,i,n,a){var s=e&i^~e&a;return s<0&&(s+=4294967296),s}function _(t,e,r,i,n){var a=t&r^t&n^r&n;return a<0&&(a+=4294967296),a}function S(t,e,r,i,n,a){var s=e&i^e&a^i&a;return s<0&&(s+=4294967296),s}function E(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function C(t,e){var r=o(t,e,28)^o(e,t,2)^o(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=o(t,e,14)^o(t,e,18)^o(e,t,9);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,1)^s(t,e,8)^h(t,e,7);return r<0&&(r+=4294967296),r}function B(t,e){var r=o(t,e,1)^o(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=o(t,e,19)^o(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}i.inherits(b,y),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,i=0;i<32;i++)r[i]=t[e+i];for(;i<r.length;i+=2){var n=(g=r[i-4],y=r[i-3],v=void 0,(v=s(g,y,19)^s(y,g,29)^h(g,y,6))<0&&(v+=4294967296),v),a=I(r[i-4],r[i-3]),o=r[i-14],u=r[i-13],f=T(r[i-30],r[i-29]),l=B(r[i-30],r[i-29]),c=r[i-32],m=r[i-31];r[i]=d(n,a,o,u,f,l,c,m),r[i+1]=p(n,a,o,u,f,l,c,m)}var g,y,v},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r,i,n,o=this.W,h=this.h[0],u=this.h[1],d=this.h[2],p=this.h[3],y=this.h[4],v=this.h[5],b=this.h[6],T=this.h[7],B=this.h[8],I=this.h[9],k=this.h[10],R=this.h[11],N=this.h[12],L=this.h[13],x=this.h[14],U=this.h[15];a(this.k.length===o.length);for(var D=0;D<o.length;D+=2){var P=x,O=U,K=(n=void 0,(n=s(r=B,i=I,14)^s(r,i,18)^s(i,r,9))<0&&(n+=4294967296),n),j=A(B,I),q=w(B,0,k,0,N),V=M(0,I,0,R,0,L),F=this.k[D],z=this.k[D+1],H=o[D],G=o[D+1],Z=m(P,O,K,j,q,V,F,z,H,G),W=g(P,O,K,j,q,V,F,z,H,G);P=E(h,u),O=C(h,u),K=_(h,0,d,0,y),j=S(0,u,0,p,0,v);var Q=l(P,O,K,j),Y=c(P,O,K,j);x=N,U=L,N=k,L=R,k=B,R=I,B=l(b,T,Z,W),I=c(T,T,Z,W),b=y,T=v,y=d,v=p,d=h,p=u,h=l(Z,W,Q,Y),u=c(Z,W,Q,Y)}f(this.h,0,h,u),f(this.h,2,d,p),f(this.h,4,y,v),f(this.h,6,b,T),f(this.h,8,B,I),f(this.h,10,k,R),f(this.h,12,N,L),f(this.h,14,x,U)},b.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},7790:()=>{},7816:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t){return t<<30|t>>>2}function f(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,h=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var c=0;c<80;++c){var d=~~(c/20),p=0|((e=i)<<5|e>>>27)+f(d,n,a,o)+h+r[c]+s[d];h=o,o=a,a=u(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},7952:(t,e,r)=>{var i=e;i.utils=r(7426),i.common=r(6166),i.sha=r(6229),i.ripemd=r(6784),i.hmac=r(8948),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},7965:()=>{},8078:(t,e,r)=>{var i=r(2861).Buffer,n=r(8276);t.exports=function(t,e,r,a){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,o=i.alloc(s),h=i.alloc(a||0),u=i.alloc(0);s>0||a>0;){var f=new n;f.update(u),f.update(t),e&&f.update(e),u=f.digest();var l=0;if(s>0){var c=o.length-s;l=Math.min(s,u.length),u.copy(o,c,0,l),s-=l}if(l<u.length&&a>0){var d=h.length-a,p=Math.min(a,u.length-l);u.copy(h,d,l,l+p),a-=p}}return u.fill(0),{key:o,iv:h}}},8106:(t,e,r)=>{var i=r(276);t.exports=i.md=i.md||{},i.md.algorithms=i.md.algorithms||{}},8170:(t,e,r)=>{"use strict";var i=r(1137),n=r(5579),a=r(4101),s=r(1241),o=r(8396),h=r(2861).Buffer;function u(t){var e;"object"!=typeof t||h.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=h.from(t));var r,u,f=a(t,e),l=f.tag,c=f.data;switch(l){case"CERTIFICATE":u=i.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=i.PublicKey.decode(c,"der")),r=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=i.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":c=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[t.algorithm.decrypt.cipher.algo.join(".")],u=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,l=parseInt(a.split("-")[1],10)/8,c=o.pbkdf2Sync(e,r,i,l,"sha1"),d=s.createDecipheriv(a,c,u),p=[];return p.push(d.update(f)),p.push(d.final()),h.concat(p)}(c=i.EncryptedPrivateKey.decode(c,"der"),e);case"PRIVATE KEY":switch(r=(u=i.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:i.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=i.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=i.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+l)}}u.signature=i.signature,t.exports=u},8206:(t,e,r)=>{var i=r(7108),n=r(2861).Buffer;function a(t){var e=n.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=n.alloc(0),o=0;s.length<e;)r=a(o++),s=n.concat([s,i("sha1").update(t).update(r).digest()]);return s.slice(0,e)}},8276:(t,e,r)=>{"use strict";var i=r(6698),n=r(4729),a=r(2861).Buffer,s=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function h(t,e){return t<<e|t>>>32-e}function u(t,e,r,i,n,a,s){return h(t+(e&r|~e&i)+n+a|0,s)+e|0}function f(t,e,r,i,n,a,s){return h(t+(e&i|r&~i)+n+a|0,s)+e|0}function l(t,e,r,i,n,a,s){return h(t+(e^r^i)+n+a|0,s)+e|0}function c(t,e,r,i,n,a,s){return h(t+(r^(e|~i))+n+a|0,s)+e|0}i(o,n),o.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,a=this._d;r=u(r,i,n,a,t[0],3614090360,7),a=u(a,r,i,n,t[1],3905402710,12),n=u(n,a,r,i,t[2],606105819,17),i=u(i,n,a,r,t[3],3250441966,22),r=u(r,i,n,a,t[4],4118548399,7),a=u(a,r,i,n,t[5],1200080426,12),n=u(n,a,r,i,t[6],2821735955,17),i=u(i,n,a,r,t[7],4249261313,22),r=u(r,i,n,a,t[8],1770035416,7),a=u(a,r,i,n,t[9],2336552879,12),n=u(n,a,r,i,t[10],4294925233,17),i=u(i,n,a,r,t[11],2304563134,22),r=u(r,i,n,a,t[12],1804603682,7),a=u(a,r,i,n,t[13],4254626195,12),n=u(n,a,r,i,t[14],2792965006,17),r=f(r,i=u(i,n,a,r,t[15],1236535329,22),n,a,t[1],4129170786,5),a=f(a,r,i,n,t[6],3225465664,9),n=f(n,a,r,i,t[11],643717713,14),i=f(i,n,a,r,t[0],3921069994,20),r=f(r,i,n,a,t[5],3593408605,5),a=f(a,r,i,n,t[10],38016083,9),n=f(n,a,r,i,t[15],3634488961,14),i=f(i,n,a,r,t[4],3889429448,20),r=f(r,i,n,a,t[9],568446438,5),a=f(a,r,i,n,t[14],3275163606,9),n=f(n,a,r,i,t[3],4107603335,14),i=f(i,n,a,r,t[8],1163531501,20),r=f(r,i,n,a,t[13],2850285829,5),a=f(a,r,i,n,t[2],4243563512,9),n=f(n,a,r,i,t[7],1735328473,14),r=l(r,i=f(i,n,a,r,t[12],2368359562,20),n,a,t[5],4294588738,4),a=l(a,r,i,n,t[8],2272392833,11),n=l(n,a,r,i,t[11],1839030562,16),i=l(i,n,a,r,t[14],4259657740,23),r=l(r,i,n,a,t[1],2763975236,4),a=l(a,r,i,n,t[4],1272893353,11),n=l(n,a,r,i,t[7],4139469664,16),i=l(i,n,a,r,t[10],3200236656,23),r=l(r,i,n,a,t[13],681279174,4),a=l(a,r,i,n,t[0],3936430074,11),n=l(n,a,r,i,t[3],3572445317,16),i=l(i,n,a,r,t[6],76029189,23),r=l(r,i,n,a,t[9],3654602809,4),a=l(a,r,i,n,t[12],3873151461,11),n=l(n,a,r,i,t[15],530742520,16),r=c(r,i=l(i,n,a,r,t[2],3299628645,23),n,a,t[0],4096336452,6),a=c(a,r,i,n,t[7],1126891415,10),n=c(n,a,r,i,t[14],2878612391,15),i=c(i,n,a,r,t[5],4237533241,21),r=c(r,i,n,a,t[12],1700485571,6),a=c(a,r,i,n,t[3],2399980690,10),n=c(n,a,r,i,t[10],4293915773,15),i=c(i,n,a,r,t[1],2240044497,21),r=c(r,i,n,a,t[8],1873313359,6),a=c(a,r,i,n,t[15],4264355552,10),n=c(n,a,r,i,t[6],2734768916,15),i=c(i,n,a,r,t[13],1309151649,21),r=c(r,i,n,a,t[4],4149444226,6),a=c(a,r,i,n,t[11],3174756917,10),n=c(n,a,r,i,t[2],718787259,15),i=c(i,n,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0},o.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 t=a.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=o},8287:(t,e,r)=>{"use strict";var i=r(7526),n=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},e.INSPECT_MAX_BYTES=50;var s=2147483647;function o(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),i=o(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return h.from(i,e,r);var n=function(t){if(h.isBuffer(t)){var e=0|p(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||V(t.length)?o(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),o(t<0?0:0|p(t))}function c(t){for(var e=t.length<0?0:0|p(t.length),r=o(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(i,h.prototype),i}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(t).length;default:if(n)return i?-1:O(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return C(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function v(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=h.from(e,i)),h.isBuffer(e))return 0===e.length?-1:b(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,i,n){var a,s=1,o=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,o/=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(a=r;a<o;a++)if(u(t,a)===u(e,-1===f?0:a-f)){if(-1===f&&(f=a),a-f+1===h)return f*s}else-1!==f&&(a-=a-f),f=-1}else for(r+h>o&&(r=o-h),a=r;a>=0;a--){for(var l=!0,c=0;c<h;c++)if(u(t,a+c)!==u(e,c)){l=!1;break}if(l)return a}return-1}function w(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=e.length;i>a/2&&(i=a/2);for(var s=0;s<i;++s){var o=parseInt(e.substr(2*s,2),16);if(V(o))return s;t[r+s]=o}return s}function M(t,e,r,i){return j(O(e,t.length-r),t,r,i)}function _(t,e,r,i){return j(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function S(t,e,r,i){return j(K(e),t,r,i)}function E(t,e,r,i){return j(function(t,e){for(var r,i,n,a=[],s=0;s<t.length&&!((e-=2)<0);++s)i=(r=t.charCodeAt(s))>>8,n=r%256,a.push(n),a.push(i);return a}(e,t.length-r),t,r,i)}function C(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var a,s,o,h,u=t[n],f=null,l=u>239?4:u>223?3:u>191?2:1;if(n+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(a=t[n+1]))&&(h=(31&u)<<6|63&a)>127&&(f=h);break;case 3:a=t[n+1],s=t[n+2],128==(192&a)&&128==(192&s)&&(h=(15&u)<<12|(63&a)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:a=t[n+1],s=t[n+2],o=t[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(h=(15&u)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&h<1114112&&(f=h)}null===f?(f=65533,l=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=l}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);for(var r="",i=0;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=T));return r}(i)}e.kMaxLength=s,h.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},h.allocUnsafe=function(t){return l(t)},h.allocUnsafeSlow=function(t){return l(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,a=Math.min(r,i);n<a;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=h.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var a=t[r];if(q(a,Uint8Array))n+a.length>i.length?h.from(a).copy(i,n):Uint8Array.prototype.set.call(i,a,n);else{if(!h.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,n)}n+=a.length}return i},h.byteLength=m,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},h.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a&&(h.prototype[a]=h.prototype.inspect),h.prototype.compare=function(t,e,r,i,n){if(q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),o=Math.min(a,s),u=this.slice(i,n),f=t.slice(e,r),l=0;l<o;++l)if(u[l]!==f[l]){a=u[l],s=f[l];break}return a<s?-1:s<a?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},h.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return M(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function B(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function I(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function k(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=e;a<r;++a)n+=F[t[a]];return n}function R(t,e,r){for(var i=t.slice(e,r),n="",a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+256*i[a+1]);return n}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,i,n,a){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<a)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function x(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,i,a){return e=+e,r>>>=0,a||x(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function D(t,e,r,i,a){return e=+e,r>>>=0,a||x(t,0,r,8),n.write(t,e,r,i,52,8),r+8}h.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var i=this.subarray(t,e);return Object.setPrototypeOf(i,h.prototype),i},h.prototype.readUintLE=h.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return i},h.prototype.readUintBE=h.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},h.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=e,n=1,a=this[t+--i];i>0&&(n*=256);)a+=this[t+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*e)),a},h.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||L(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,a=0;for(this[e]=255&t;++a<r&&(n*=256);)this[e+a]=t/n&255;return e+r},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||L(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,a=1;for(this[e+n]=255&t;--n>=0&&(a*=256);)this[e+n]=t/a&255;return e+r},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}var a=0,s=1,o=0;for(this[e]=255&t;++a<r&&(s*=256);)t<0&&0===o&&0!==this[e+a-1]&&(o=1),this[e+a]=(t/s|0)-o&255;return e+r},h.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}var a=r-1,s=1,o=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)t<0&&0===o&&0!==this[e+a+1]&&(o=1),this[e+a]=(t/s|0)-o&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,i){if(!h.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n=i-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,i):Uint8Array.prototype.set.call(t,this.subarray(r,i),e),n},h.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var s=h.isBuffer(t)?t:h.from(t,i),o=s.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<r-e;++a)this[a+e]=s[a%o]}return this};var P=/[^+/0-9A-Za-z-_]/g;function O(t,e){var r;e=e||1/0;for(var i=t.length,n=null,a=[],s=0;s<i;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function K(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}var F=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()},8310:(t,e,r)=>{t.exports=n;var i=r(7007).EventEmitter;function n(){i.call(this)}r(6698)(n,i),n.Readable=r(5412),n.Writable=r(6708),n.Duplex=r(5382),n.Transform=r(4610),n.PassThrough=r(3600),n.finished=r(6238),n.pipeline=r(7758),n.Stream=n,n.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",a),t._isStdio||e&&!1===e.end||(r.on("end",o),r.on("close",h));var s=!1;function o(){s||(s=!0,t.end())}function h(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(f(),0===i.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",n),t.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",h),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",u),t.on("error",u),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},8392:(t,e,r)=>{var i=r(276);r(9504),r(2746),r(9095),r(8106),r(1373),r(6418),r(2385),r(1417),r(5805),r(7619);var n=i.asn1,a=t.exports=i.pki=i.pki||{},s=a.oids,o={};o.CN=s.commonName,o.commonName="CN",o.C=s.countryName,o.countryName="C",o.L=s.localityName,o.localityName="L",o.ST=s.stateOrProvinceName,o.stateOrProvinceName="ST",o.O=s.organizationName,o.organizationName="O",o.OU=s.organizationalUnitName,o.organizationalUnitName="OU",o.E=s.emailAddress,o.emailAddress="E";var h=i.pki.rsa.publicKeyValidator,u={name:"Certificate",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:n.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:n.Class.UNIVERSAL,type:n.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:n.Class.UNIVERSAL,type:n.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:n.Class.UNIVERSAL,type:n.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:n.Class.UNIVERSAL,type:n.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},h,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:n.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:n.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:n.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},f={name:"rsapss",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:n.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:n.Class.UNIVERSAL,type:n.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:n.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:n.Class.UNIVERSAL,type:n.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},l={name:"CertificationRequestInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},h,{name:"CertificationRequestInfo.attributes",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0}]}]}]},c={name:"CertificationRequest",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[l,{name:"CertificationRequest.signatureAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:n.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function d(t,e){"string"==typeof e&&(e={shortName:e});for(var r,i=null,n=0;null===i&&n<t.attributes.length;++n)r=t.attributes[n],(e.type&&e.type===r.type||e.name&&e.name===r.name||e.shortName&&e.shortName===r.shortName)&&(i=r);return i}a.RDNAttributesAsArray=function(t,e){for(var r,i,a,h=[],u=0;u<t.value.length;++u){r=t.value[u];for(var f=0;f<r.value.length;++f)a={},i=r.value[f],a.type=n.derToOid(i.value[0].value),a.value=i.value[1].value,a.valueTagClass=i.value[1].type,a.type in s&&(a.name=s[a.type],a.name in o&&(a.shortName=o[a.name])),e&&(e.update(a.type),e.update(a.value)),h.push(a)}return h},a.CRIAttributesAsArray=function(t){for(var e=[],r=0;r<t.length;++r)for(var i=t[r],h=n.derToOid(i.value[0].value),u=i.value[1].value,f=0;f<u.length;++f){var l={};if(l.type=h,l.value=u[f].value,l.valueTagClass=u[f].type,l.type in s&&(l.name=s[l.type],l.name in o&&(l.shortName=o[l.name])),l.type===s.extensionRequest){l.extensions=[];for(var c=0;c<l.value.length;++c)l.extensions.push(a.certificateExtensionFromAsn1(l.value[c]))}e.push(l)}return e};var p=function(t,e,r){var i={};if(t!==s["RSASSA-PSS"])return i;r&&(i={hash:{algorithmOid:s.sha1},mgf:{algorithmOid:s.mgf1,hash:{algorithmOid:s.sha1}},saltLength:20});var a={},o=[];if(!n.validate(e,f,a,o)){var h=new Error("Cannot read RSASSA-PSS parameter block.");throw h.errors=o,h}return void 0!==a.hashOid&&(i.hash=i.hash||{},i.hash.algorithmOid=n.derToOid(a.hashOid)),void 0!==a.maskGenOid&&(i.mgf=i.mgf||{},i.mgf.algorithmOid=n.derToOid(a.maskGenOid),i.mgf.hash=i.mgf.hash||{},i.mgf.hash.algorithmOid=n.derToOid(a.maskGenHashOid)),void 0!==a.saltLength&&(i.saltLength=a.saltLength.charCodeAt(0)),i},m=function(t){switch(s[t.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return i.md.sha1.create();case"md5WithRSAEncryption":return i.md.md5.create();case"sha256WithRSAEncryption":case"RSASSA-PSS":return i.md.sha256.create();case"sha384WithRSAEncryption":return i.md.sha384.create();case"sha512WithRSAEncryption":return i.md.sha512.create();default:var e=new Error("Could not compute "+t.type+" digest. Unknown signature OID.");throw e.signatureOid=t.signatureOid,e}},g=function(t){var e,r=t.certificate;switch(r.signatureOid){case s.sha1WithRSAEncryption:case s.sha1WithRSASignature:break;case s["RSASSA-PSS"]:var n,a,o;if(void 0===(n=s[r.signatureParameters.mgf.hash.algorithmOid])||void 0===i.md[n])throw(o=new Error("Unsupported MGF hash function.")).oid=r.signatureParameters.mgf.hash.algorithmOid,o.name=n,o;if(void 0===(a=s[r.signatureParameters.mgf.algorithmOid])||void 0===i.mgf[a])throw(o=new Error("Unsupported MGF function.")).oid=r.signatureParameters.mgf.algorithmOid,o.name=a,o;if(a=i.mgf[a].create(i.md[n].create()),void 0===(n=s[r.signatureParameters.hash.algorithmOid])||void 0===i.md[n])throw(o=new Error("Unsupported RSASSA-PSS hash function.")).oid=r.signatureParameters.hash.algorithmOid,o.name=n,o;e=i.pss.create(i.md[n].create(),a,r.signatureParameters.saltLength)}return r.publicKey.verify(t.md.digest().getBytes(),t.signature,e)};function y(t){for(var e,r,a=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),s=t.attributes,o=0;o<s.length;++o){var h=(e=s[o]).value,u=n.Type.PRINTABLESTRING;"valueTagClass"in e&&(u=e.valueTagClass)===n.Type.UTF8&&(h=i.util.encodeUtf8(h)),r=n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.type).getBytes()),n.create(n.Class.UNIVERSAL,u,!1,h)])]),a.value.push(r)}return a}function v(t){for(var e,r=0;r<t.length;++r){if(void 0===(e=t[r]).name&&(e.type&&e.type in a.oids?e.name=a.oids[e.type]:e.shortName&&e.shortName in o&&(e.name=a.oids[o[e.shortName]])),void 0===e.type){if(!e.name||!(e.name in a.oids))throw(h=new Error("Attribute type not specified.")).attribute=e,h;e.type=a.oids[e.name]}if(void 0===e.shortName&&e.name&&e.name in o&&(e.shortName=o[e.name]),e.type===s.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=n.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var i=0;i<e.extensions.length;++i)e.value.push(a.certificateExtensionToAsn1(b(e.extensions[i])))}var h;if(void 0===e.value)throw(h=new Error("Attribute value not specified.")).attribute=e,h}}function b(t,e){if(e=e||{},void 0===t.name&&t.id&&t.id in a.oids&&(t.name=a.oids[t.id]),void 0===t.id){if(!t.name||!(t.name in a.oids))throw(M=new Error("Extension ID not specified.")).extension=t,M;t.id=a.oids[t.name]}if(void 0!==t.value)return t;if("keyUsage"===t.name){var r=0,o=0,h=0;t.digitalSignature&&(o|=128,r=7),t.nonRepudiation&&(o|=64,r=6),t.keyEncipherment&&(o|=32,r=5),t.dataEncipherment&&(o|=16,r=4),t.keyAgreement&&(o|=8,r=3),t.keyCertSign&&(o|=4,r=2),t.cRLSign&&(o|=2,r=1),t.encipherOnly&&(o|=1,r=0),t.decipherOnly&&(h|=128,r=7);var u=String.fromCharCode(r);0!==h?u+=String.fromCharCode(o)+String.fromCharCode(h):0!==o&&(u+=String.fromCharCode(o)),t.value=n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,u)}else if("basicConstraints"===t.name)t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),t.cA&&t.value.value.push(n.create(n.Class.UNIVERSAL,n.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in t&&t.value.value.push(n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.pathLenConstraint).getBytes()));else if("extKeyUsage"===t.name){t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);var f=t.value.value;for(var l in t)!0===t[l]&&(l in s?f.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(s[l]).getBytes())):-1!==l.indexOf(".")&&f.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(l).getBytes())))}else if("nsCertType"===t.name)r=0,o=0,t.client&&(o|=128,r=7),t.server&&(o|=64,r=6),t.email&&(o|=32,r=5),t.objsign&&(o|=16,r=4),t.reserved&&(o|=8,r=3),t.sslCA&&(o|=4,r=2),t.emailCA&&(o|=2,r=1),t.objCA&&(o|=1,r=0),u=String.fromCharCode(r),0!==o&&(u+=String.fromCharCode(o)),t.value=n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,u);else if("subjectAltName"===t.name||"issuerAltName"===t.name){t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);for(var c=0;c<t.altNames.length;++c){if(u=(v=t.altNames[c]).value,7===v.type&&v.ip){if(null===(u=i.util.bytesFromIP(v.ip)))throw(M=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=t,M}else 8===v.type&&(u=v.oid?n.oidToDer(n.oidToDer(v.oid)):n.oidToDer(u));t.value.value.push(n.create(n.Class.CONTEXT_SPECIFIC,v.type,!1,u))}}else if("nsComment"===t.name&&e.cert){if(!/^[\x00-\x7F]*$/.test(t.comment)||t.comment.length<1||t.comment.length>128)throw new Error('Invalid "nsComment" content.');t.value=n.create(n.Class.UNIVERSAL,n.Type.IA5STRING,!1,t.comment)}else if("subjectKeyIdentifier"===t.name&&e.cert){var d=e.cert.generateSubjectKeyIdentifier();t.subjectKeyIdentifier=d.toHex(),t.value=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,d.getBytes())}else if("authorityKeyIdentifier"===t.name&&e.cert){if(t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),f=t.value.value,t.keyIdentifier){var p=!0===t.keyIdentifier?e.cert.generateSubjectKeyIdentifier().getBytes():t.keyIdentifier;f.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!1,p))}if(t.authorityCertIssuer){var m=[n.create(n.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===t.authorityCertIssuer?e.cert.issuer:t.authorityCertIssuer)])];f.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,m))}if(t.serialNumber){var g=i.util.hexToBytes(!0===t.serialNumber?e.cert.serialNumber:t.serialNumber);f.push(n.create(n.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if("cRLDistributionPoints"===t.name){t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),f=t.value.value;var v,b=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),w=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[]);for(c=0;c<t.altNames.length;++c){if(u=(v=t.altNames[c]).value,7===v.type&&v.ip){if(null===(u=i.util.bytesFromIP(v.ip)))throw(M=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=t,M}else 8===v.type&&(u=v.oid?n.oidToDer(n.oidToDer(v.oid)):n.oidToDer(u));w.value.push(n.create(n.Class.CONTEXT_SPECIFIC,v.type,!1,u))}b.value.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[w])),f.push(b)}var M;if(void 0===t.value)throw(M=new Error("Extension value not specified.")).extension=t,M;return t}function w(t,e){if(t===s["RSASSA-PSS"]){var r=[];return void 0!==e.hash.algorithmOid&&r.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.hash.algorithmOid).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])])),void 0!==e.mgf.algorithmOid&&r.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.mgf.algorithmOid).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.mgf.hash.algorithmOid).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])])])),void 0!==e.saltLength&&r.push(n.create(n.Class.CONTEXT_SPECIFIC,2,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(e.saltLength).getBytes())])),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,r)}return n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")}function M(t){var e=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===t.attributes.length)return e;for(var r=t.attributes,a=0;a<r.length;++a){var s=r[a],o=s.value,h=n.Type.UTF8;"valueTagClass"in s&&(h=s.valueTagClass),h===n.Type.UTF8&&(o=i.util.encodeUtf8(o));var u=!1;"valueConstructed"in s&&(u=s.valueConstructed);var f=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(s.type).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,h,u,o)])]);e.value.push(f)}return e}a.certificateFromPem=function(t,e,r){var s=i.pem.decode(t)[0];if("CERTIFICATE"!==s.type&&"X509 CERTIFICATE"!==s.type&&"TRUSTED CERTIFICATE"!==s.type){var o=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var h=n.fromDer(s.body,r);return a.certificateFromAsn1(h,e)},a.certificateToPem=function(t,e){var r={type:"CERTIFICATE",body:n.toDer(a.certificateToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.publicKeyFromPem=function(t){var e=i.pem.decode(t)[0];if("PUBLIC KEY"!==e.type&&"RSA PUBLIC KEY"!==e.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var s=n.fromDer(e.body);return a.publicKeyFromAsn1(s)},a.publicKeyToPem=function(t,e){var r={type:"PUBLIC KEY",body:n.toDer(a.publicKeyToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.publicKeyToRSAPublicKeyPem=function(t,e){var r={type:"RSA PUBLIC KEY",body:n.toDer(a.publicKeyToRSAPublicKey(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.getPublicKeyFingerprint=function(t,e){var r,s=(e=e||{}).md||i.md.sha1.create();switch(e.type||"RSAPublicKey"){case"RSAPublicKey":r=n.toDer(a.publicKeyToRSAPublicKey(t)).getBytes();break;case"SubjectPublicKeyInfo":r=n.toDer(a.publicKeyToAsn1(t)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+e.type+'".')}s.start(),s.update(r);var o=s.digest();if("hex"===e.encoding){var h=o.toHex();return e.delimiter?h.match(/.{2}/g).join(e.delimiter):h}if("binary"===e.encoding)return o.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".');return o},a.certificationRequestFromPem=function(t,e,r){var s=i.pem.decode(t)[0];if("CERTIFICATE REQUEST"!==s.type){var o=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var h=n.fromDer(s.body,r);return a.certificationRequestFromAsn1(h,e)},a.certificationRequestToPem=function(t,e){var r={type:"CERTIFICATE REQUEST",body:n.toDer(a.certificationRequestToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.createCertificate=function(){var t={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return t.siginfo.algorithmOid=null,t.validity={},t.validity.notBefore=new Date,t.validity.notAfter=new Date,t.issuer={},t.issuer.getField=function(e){return d(t.issuer,e)},t.issuer.addField=function(e){v([e]),t.issuer.attributes.push(e)},t.issuer.attributes=[],t.issuer.hash=null,t.subject={},t.subject.getField=function(e){return d(t.subject,e)},t.subject.addField=function(e){v([e]),t.subject.attributes.push(e)},t.subject.attributes=[],t.subject.hash=null,t.extensions=[],t.publicKey=null,t.md=null,t.setSubject=function(e,r){v(e),t.subject.attributes=e,delete t.subject.uniqueId,r&&(t.subject.uniqueId=r),t.subject.hash=null},t.setIssuer=function(e,r){v(e),t.issuer.attributes=e,delete t.issuer.uniqueId,r&&(t.issuer.uniqueId=r),t.issuer.hash=null},t.setExtensions=function(e){for(var r=0;r<e.length;++r)b(e[r],{cert:t});t.extensions=e},t.getExtension=function(e){"string"==typeof e&&(e={name:e});for(var r,i=null,n=0;null===i&&n<t.extensions.length;++n)r=t.extensions[n],(e.id&&r.id===e.id||e.name&&r.name===e.name)&&(i=r);return i},t.sign=function(e,r){t.md=r||i.md.sha1.create();var o=s[t.md.algorithm+"WithRSAEncryption"];if(!o){var h=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw h.algorithm=t.md.algorithm,h}t.signatureOid=t.siginfo.algorithmOid=o,t.tbsCertificate=a.getTBSCertificate(t);var u=n.toDer(t.tbsCertificate);t.md.update(u.getBytes()),t.signature=e.sign(t.md)},t.verify=function(e){var r=!1;if(!t.issued(e)){var i=e.issuer,s=t.subject,o=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw o.expectedIssuer=s.attributes,o.actualIssuer=i.attributes,o}var h=e.md;if(null===h){h=m({signatureOid:e.signatureOid,type:"certificate"});var u=e.tbsCertificate||a.getTBSCertificate(e),f=n.toDer(u);h.update(f.getBytes())}return null!==h&&(r=g({certificate:t,md:h,signature:e.signature})),r},t.isIssuer=function(e){var r=!1,i=t.issuer,n=e.subject;if(i.hash&&n.hash)r=i.hash===n.hash;else if(i.attributes.length===n.attributes.length){var a,s;r=!0;for(var o=0;r&&o<i.attributes.length;++o)a=i.attributes[o],s=n.attributes[o],a.type===s.type&&a.value===s.value||(r=!1)}return r},t.issued=function(e){return e.isIssuer(t)},t.generateSubjectKeyIdentifier=function(){return a.getPublicKeyFingerprint(t.publicKey,{type:"RSAPublicKey"})},t.verifySubjectKeyIdentifier=function(){for(var e=s.subjectKeyIdentifier,r=0;r<t.extensions.length;++r){var n=t.extensions[r];if(n.id===e){var a=t.generateSubjectKeyIdentifier().getBytes();return i.util.hexToBytes(n.subjectKeyIdentifier)===a}}return!1},t},a.certificateFromAsn1=function(t,e){var r={},s=[];if(!n.validate(t,u,r,s)){var o=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw o.errors=s,o}if(n.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var h=a.createCertificate();h.version=r.certVersion?r.certVersion.charCodeAt(0):0;var f=i.util.createBuffer(r.certSerialNumber);h.serialNumber=f.toHex(),h.signatureOid=i.asn1.derToOid(r.certSignatureOid),h.signatureParameters=p(h.signatureOid,r.certSignatureParams,!0),h.siginfo.algorithmOid=i.asn1.derToOid(r.certinfoSignatureOid),h.siginfo.parameters=p(h.siginfo.algorithmOid,r.certinfoSignatureParams,!1),h.signature=r.certSignature;var l=[];if(void 0!==r.certValidity1UTCTime&&l.push(n.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&l.push(n.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&l.push(n.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&l.push(n.generalizedTimeToDate(r.certValidity4GeneralizedTime)),l.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(h.validity.notBefore=l[0],h.validity.notAfter=l[1],h.tbsCertificate=r.tbsCertificate,e){h.md=m({signatureOid:h.signatureOid,type:"certificate"});var c=n.toDer(h.tbsCertificate);h.md.update(c.getBytes())}var g=i.md.sha1.create(),y=n.toDer(r.certIssuer);g.update(y.getBytes()),h.issuer.getField=function(t){return d(h.issuer,t)},h.issuer.addField=function(t){v([t]),h.issuer.attributes.push(t)},h.issuer.attributes=a.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(h.issuer.uniqueId=r.certIssuerUniqueId),h.issuer.hash=g.digest().toHex();var b=i.md.sha1.create(),w=n.toDer(r.certSubject);return b.update(w.getBytes()),h.subject.getField=function(t){return d(h.subject,t)},h.subject.addField=function(t){v([t]),h.subject.attributes.push(t)},h.subject.attributes=a.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(h.subject.uniqueId=r.certSubjectUniqueId),h.subject.hash=b.digest().toHex(),r.certExtensions?h.extensions=a.certificateExtensionsFromAsn1(r.certExtensions):h.extensions=[],h.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),h},a.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r<t.value.length;++r)for(var i=t.value[r],n=0;n<i.value.length;++n)e.push(a.certificateExtensionFromAsn1(i.value[n]));return e},a.certificateExtensionFromAsn1=function(t){var e={};if(e.id=n.derToOid(t.value[0].value),e.critical=!1,t.value[1].type===n.Type.BOOLEAN?(e.critical=0!==t.value[1].value.charCodeAt(0),e.value=t.value[2].value):e.value=t.value[1].value,e.id in s)if(e.name=s[e.id],"keyUsage"===e.name){var r=0,a=0;(h=n.fromDer(e.value)).value.length>1&&(r=h.value.charCodeAt(1),a=h.value.length>2?h.value.charCodeAt(2):0),e.digitalSignature=!(128&~r),e.nonRepudiation=!(64&~r),e.keyEncipherment=!(32&~r),e.dataEncipherment=!(16&~r),e.keyAgreement=!(8&~r),e.keyCertSign=!(4&~r),e.cRLSign=!(2&~r),e.encipherOnly=!(1&~r),e.decipherOnly=!(128&~a)}else if("basicConstraints"===e.name){(h=n.fromDer(e.value)).value.length>0&&h.value[0].type===n.Type.BOOLEAN?e.cA=0!==h.value[0].value.charCodeAt(0):e.cA=!1;var o=null;h.value.length>0&&h.value[0].type===n.Type.INTEGER?o=h.value[0].value:h.value.length>1&&(o=h.value[1].value),null!==o&&(e.pathLenConstraint=n.derToInteger(o))}else if("extKeyUsage"===e.name)for(var h=n.fromDer(e.value),u=0;u<h.value.length;++u){var f=n.derToOid(h.value[u].value);f in s?e[s[f]]=!0:e[f]=!0}else if("nsCertType"===e.name)r=0,(h=n.fromDer(e.value)).value.length>1&&(r=h.value.charCodeAt(1)),e.client=!(128&~r),e.server=!(64&~r),e.email=!(32&~r),e.objsign=!(16&~r),e.reserved=!(8&~r),e.sslCA=!(4&~r),e.emailCA=!(2&~r),e.objCA=!(1&~r);else if("subjectAltName"===e.name||"issuerAltName"===e.name){var l;e.altNames=[],h=n.fromDer(e.value);for(var c=0;c<h.value.length;++c){var d={type:(l=h.value[c]).type,value:l.value};switch(e.altNames.push(d),l.type){case 1:case 2:case 6:break;case 7:d.ip=i.util.bytesToIP(l.value);break;case 8:d.oid=n.derToOid(l.value)}}}else"subjectKeyIdentifier"===e.name&&(h=n.fromDer(e.value),e.subjectKeyIdentifier=i.util.bytesToHex(h.value));return e},a.certificationRequestFromAsn1=function(t,e){var r={},s=[];if(!n.validate(t,c,r,s)){var o=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw o.errors=s,o}if(n.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var h=a.createCertificationRequest();if(h.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,h.signatureOid=i.asn1.derToOid(r.csrSignatureOid),h.signatureParameters=p(h.signatureOid,r.csrSignatureParams,!0),h.siginfo.algorithmOid=i.asn1.derToOid(r.csrSignatureOid),h.siginfo.parameters=p(h.siginfo.algorithmOid,r.csrSignatureParams,!1),h.signature=r.csrSignature,h.certificationRequestInfo=r.certificationRequestInfo,e){h.md=m({signatureOid:h.signatureOid,type:"certification request"});var u=n.toDer(h.certificationRequestInfo);h.md.update(u.getBytes())}var f=i.md.sha1.create();return h.subject.getField=function(t){return d(h.subject,t)},h.subject.addField=function(t){v([t]),h.subject.attributes.push(t)},h.subject.attributes=a.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),h.subject.hash=f.digest().toHex(),h.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),h.getAttribute=function(t){return d(h,t)},h.addAttribute=function(t){v([t]),h.attributes.push(t)},h.attributes=a.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),h},a.createCertificationRequest=function(){var t={version:0,signatureOid:null,signature:null,siginfo:{}};return t.siginfo.algorithmOid=null,t.subject={},t.subject.getField=function(e){return d(t.subject,e)},t.subject.addField=function(e){v([e]),t.subject.attributes.push(e)},t.subject.attributes=[],t.subject.hash=null,t.publicKey=null,t.attributes=[],t.getAttribute=function(e){return d(t,e)},t.addAttribute=function(e){v([e]),t.attributes.push(e)},t.md=null,t.setSubject=function(e){v(e),t.subject.attributes=e,t.subject.hash=null},t.setAttributes=function(e){v(e),t.attributes=e},t.sign=function(e,r){t.md=r||i.md.sha1.create();var o=s[t.md.algorithm+"WithRSAEncryption"];if(!o){var h=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw h.algorithm=t.md.algorithm,h}t.signatureOid=t.siginfo.algorithmOid=o,t.certificationRequestInfo=a.getCertificationRequestInfo(t);var u=n.toDer(t.certificationRequestInfo);t.md.update(u.getBytes()),t.signature=e.sign(t.md)},t.verify=function(){var e=!1,r=t.md;if(null===r){r=m({signatureOid:t.signatureOid,type:"certification request"});var i=t.certificationRequestInfo||a.getCertificationRequestInfo(t),s=n.toDer(i);r.update(s.getBytes())}return null!==r&&(e=g({certificate:t,md:r,signature:t.signature})),e},t};var _=new Date("1950-01-01T00:00:00Z"),S=new Date("2050-01-01T00:00:00Z");function E(t){return t>=_&&t<S?n.create(n.Class.UNIVERSAL,n.Type.UTCTIME,!1,n.dateToUtcTime(t)):n.create(n.Class.UNIVERSAL,n.Type.GENERALIZEDTIME,!1,n.dateToGeneralizedTime(t))}a.getTBSCertificate=function(t){var e=E(t.validity.notBefore),r=E(t.validity.notAfter),s=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes())]),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,i.util.hexToBytes(t.serialNumber)),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.siginfo.algorithmOid).getBytes()),w(t.siginfo.algorithmOid,t.siginfo.parameters)]),y(t.issuer),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[e,r]),y(t.subject),a.publicKeyToAsn1(t.publicKey)]);return t.issuer.uniqueId&&s.value.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,[n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.issuer.uniqueId)])),t.subject.uniqueId&&s.value.push(n.create(n.Class.CONTEXT_SPECIFIC,2,!0,[n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.subject.uniqueId)])),t.extensions.length>0&&s.value.push(a.certificateExtensionsToAsn1(t.extensions)),s},a.getCertificationRequestInfo=function(t){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),y(t.subject),a.publicKeyToAsn1(t.publicKey),M(t)])},a.distinguishedNameToAsn1=function(t){return y(t)},a.certificateToAsn1=function(t){var e=t.tbsCertificate||a.getTBSCertificate(t);return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[e,n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.signatureOid).getBytes()),w(t.signatureOid,t.signatureParameters)]),n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},a.certificateExtensionsToAsn1=function(t){var e=n.create(n.Class.CONTEXT_SPECIFIC,3,!0,[]),r=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);e.value.push(r);for(var i=0;i<t.length;++i)r.value.push(a.certificateExtensionToAsn1(t[i]));return e},a.certificateExtensionToAsn1=function(t){var e=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);e.value.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.id).getBytes())),t.critical&&e.value.push(n.create(n.Class.UNIVERSAL,n.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=t.value;return"string"!=typeof t.value&&(r=n.toDer(r).getBytes()),e.value.push(n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,r)),e},a.certificationRequestToAsn1=function(t){var e=t.certificationRequestInfo||a.getCertificationRequestInfo(t);return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[e,n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.signatureOid).getBytes()),w(t.signatureOid,t.signatureParameters)]),n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},a.createCaStore=function(t){var e={certs:{}};function r(t){return s(t),e.certs[t.hash]||null}function s(t){if(!t.hash){var e=i.md.sha1.create();t.attributes=a.RDNAttributesAsArray(y(t),e),t.hash=e.digest().toHex()}}if(e.getIssuer=function(t){return r(t.issuer)},e.addCertificate=function(t){if("string"==typeof t&&(t=i.pki.certificateFromPem(t)),s(t.subject),!e.hasCertificate(t))if(t.subject.hash in e.certs){var r=e.certs[t.subject.hash];i.util.isArray(r)||(r=[r]),r.push(t),e.certs[t.subject.hash]=r}else e.certs[t.subject.hash]=t},e.hasCertificate=function(t){"string"==typeof t&&(t=i.pki.certificateFromPem(t));var e=r(t.subject);if(!e)return!1;i.util.isArray(e)||(e=[e]);for(var s=n.toDer(a.certificateToAsn1(t)).getBytes(),o=0;o<e.length;++o)if(s===n.toDer(a.certificateToAsn1(e[o])).getBytes())return!0;return!1},e.listAllCertificates=function(){var t=[];for(var r in e.certs)if(e.certs.hasOwnProperty(r)){var n=e.certs[r];if(i.util.isArray(n))for(var a=0;a<n.length;++a)t.push(n[a]);else t.push(n)}return t},e.removeCertificate=function(t){var o;if("string"==typeof t&&(t=i.pki.certificateFromPem(t)),s(t.subject),!e.hasCertificate(t))return null;var h=r(t.subject);if(!i.util.isArray(h))return o=e.certs[t.subject.hash],delete e.certs[t.subject.hash],o;for(var u=n.toDer(a.certificateToAsn1(t)).getBytes(),f=0;f<h.length;++f)u===n.toDer(a.certificateToAsn1(h[f])).getBytes()&&(o=h[f],h.splice(f,1));return 0===h.length&&delete e.certs[t.subject.hash],o},t)for(var o=0;o<t.length;++o){var h=t[o];e.addCertificate(h)}return e},a.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},a.verifyCertificateChain=function(t,e,r){"function"==typeof r&&(r={verify:r}),r=r||{};var n=(e=e.slice(0)).slice(0),s=r.validityCheckDate;void 0===s&&(s=new Date);var o=!0,h=null,u=0;do{var f=e.shift(),l=null,c=!1;if(s&&(s<f.validity.notBefore||s>f.validity.notAfter)&&(h={message:"Certificate is not valid yet or has expired.",error:a.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:s}),null===h){if(null===(l=e[0]||t.getIssuer(f))&&f.isIssuer(f)&&(c=!0,l=f),l){var d=l;i.util.isArray(d)||(d=[d]);for(var p=!1;!p&&d.length>0;){l=d.shift();try{p=l.verify(f)}catch(t){}}p||(h={message:"Certificate signature is invalid.",error:a.certificateError.bad_certificate})}null!==h||l&&!c||t.hasCertificate(f)||(h={message:"Certificate is not trusted.",error:a.certificateError.unknown_ca})}if(null===h&&l&&!f.isIssuer(l)&&(h={message:"Certificate issuer is invalid.",error:a.certificateError.bad_certificate}),null===h)for(var m={keyUsage:!0,basicConstraints:!0},g=0;null===h&&g<f.extensions.length;++g){var y=f.extensions[g];y.critical&&!(y.name in m)&&(h={message:"Certificate has an unsupported critical extension.",error:a.certificateError.unsupported_certificate})}if(null===h&&(!o||0===e.length&&(!l||c))){var v=f.getExtension("basicConstraints"),b=f.getExtension("keyUsage");null!==b&&(b.keyCertSign&&null!==v||(h={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:a.certificateError.bad_certificate})),null!==h||null===v||v.cA||(h={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:a.certificateError.bad_certificate}),null===h&&null!==b&&"pathLenConstraint"in v&&u-1>v.pathLenConstraint&&(h={message:"Certificate basicConstraints pathLenConstraint violated.",error:a.certificateError.bad_certificate})}var w=null===h||h.error,M=r.verify?r.verify(w,u,n):w;if(!0!==M)throw!0===w&&(h={message:"The application rejected the certificate.",error:a.certificateError.bad_certificate}),(M||0===M)&&("object"!=typeof M||i.util.isArray(M)?"string"==typeof M&&(h.error=M):(M.message&&(h.message=M.message),M.error&&(h.error=M.error))),h;h=null,o=!1,++u}while(e.length>0);return!0}},8393:(t,e,r)=>{var i=r(8287),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(a(i,e),e.Buffer=s),a(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},8396:(t,e,r)=>{e.pbkdf2=r(3832),e.pbkdf2Sync=r(1352)},8490:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(9368).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,D=x>>>13,P=0|s[9],O=8191&P,K=P>>>13,j=0|o[0],q=8191&j,V=j>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(D,q)|0,a=Math.imul(D,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(K,q)|0,a=Math.imul(K,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(D,z)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(K,z)|0,a=Math.imul(K,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(K,Z)|0,a=Math.imul(K,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(K,Y)|0,a=Math.imul(K,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(K,$)|0,a=Math.imul(K,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(K,rt)|0,a=Math.imul(K,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(K,at)|0,a=Math.imul(K,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(D,ht)|0,a=a+Math.imul(D,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(K,ht)|0,a=Math.imul(K,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(K,lt)|0,a=Math.imul(K,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(K,pt)|0))<<13)|0;return u=((a=Math.imul(K,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},8545:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011),a=n.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function o(){this.place=0}function h(t,e){var r=t[e.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;if(0===t[e.place])return!1;for(var n=0,a=0,s=e.place;a<i;a++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=n.toArray(t,e);var r=new o;if(48!==t[r.place++])return!1;var a=h(t,r);if(!1===a)return!1;if(a+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=h(t,r);if(!1===s)return!1;if(128&t[r.place])return!1;var u=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var f=h(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;if(128&t[r.place])return!1;var l=t.slice(r.place,f+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new i(u),this.s=new i(l),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];f(i,e.length),(i=i.concat(e)).push(2),f(i,r.length);var a=i.concat(r),s=[48];return f(s,a.length),s=s.concat(a),n.encode(s,t)}},8650:(t,e,r)=>{"use strict";var i=r(7952),n=r(480),a=r(7011),s=a.assert,o=a.parseBytes,h=r(6661),u=r(220);function f(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=n[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=i.sha512}t.exports=f,f.prototype.sign=function(t,e){t=o(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),a=this.encodePoint(n),s=this.hashInt(a,r.pubBytes(),t).mul(r.priv()),h=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:a})},f.prototype.verify=function(t,e,r){if(t=o(t),(e=this.makeSignature(e)).S().gte(e.eddsa.curve.n)||e.S().isNeg())return!1;var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(a)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return a.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return h.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return h.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=a.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),i=!!(128&t[e]),n=a.intFromLE(r);return this.curve.pointFromY(n,i)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return a.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},8678:(t,e,r)=>{var i=r(276);r(9504),r(3986);var n=t.exports=i.tls;function a(t,e,r){var a=e.entity===i.tls.ConnectionEnd.client;t.read.cipherState={init:!1,cipher:i.cipher.createDecipher("AES-CBC",a?r.keys.server_write_key:r.keys.client_write_key),iv:a?r.keys.server_write_IV:r.keys.client_write_IV},t.write.cipherState={init:!1,cipher:i.cipher.createCipher("AES-CBC",a?r.keys.client_write_key:r.keys.server_write_key),iv:a?r.keys.client_write_IV:r.keys.server_write_IV},t.read.cipherFunction=u,t.write.cipherFunction=s,t.read.macLength=t.write.macLength=r.mac_length,t.read.macFunction=t.write.macFunction=n.hmac_sha1}function s(t,e){var r,a=!1,s=e.macFunction(e.macKey,e.sequenceNumber,t);t.fragment.putBytes(s),e.updateSequenceNumber(),r=t.version.minor===n.Versions.TLS_1_0.minor?e.cipherState.init?null:e.cipherState.iv:i.random.getBytesSync(16),e.cipherState.init=!0;var h=e.cipherState.cipher;return h.start({iv:r}),t.version.minor>=n.Versions.TLS_1_1.minor&&h.output.putBytes(r),h.update(t.fragment),h.finish(o)&&(t.fragment=h.output,t.length=t.fragment.length(),a=!0),a}function o(t,e,r){if(!r){var i=t-e.length()%t;e.fillWithByte(i-1,i)}return!0}function h(t,e,r){var i=!0;if(r){for(var n=e.length(),a=e.last(),s=n-1-a;s<n-1;++s)i=i&&e.at(s)==a;i&&e.truncate(a+1)}return i}function u(t,e){var r,a=!1;r=t.version.minor===n.Versions.TLS_1_0.minor?e.cipherState.init?null:e.cipherState.iv:t.fragment.getBytes(16),e.cipherState.init=!0;var s=e.cipherState.cipher;s.start({iv:r}),s.update(t.fragment),a=s.finish(h);var o=e.macLength,u=i.random.getBytesSync(o),f=s.output.length();f>=o?(t.fragment=s.output.getBytes(f-o),u=s.output.getBytes(o)):t.fragment=s.output.getBytes(),t.fragment=i.util.createBuffer(t.fragment),t.length=t.fragment.length();var l=e.macFunction(e.macKey,e.sequenceNumber,t);return e.updateSequenceNumber(),a=function(t,e,r){var n=i.hmac.create();return n.start("SHA1",t),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(r),e===(r=n.digest().getBytes())}(e.macKey,u,l)&&a,a}n.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=n.BulkCipherAlgorithm.aes,t.cipher_type=n.CipherType.block,t.enc_key_length=16,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=n.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:a},n.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=n.BulkCipherAlgorithm.aes,t.cipher_type=n.CipherType.block,t.enc_key_length=32,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=n.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:a}},8902:(t,e,r)=>{var i=r(8170),n=r(3209),a=r(7108),s=r(8206),o=r(2061),h=r(2509),u=r(9247),f=r(7332),l=r(2861).Buffer;t.exports=function(t,e,r){var c;c=t.padding?t.padding:r?1:4;var d,p=i(t);if(4===c)d=function(t,e){var r=t.modulus.byteLength(),i=e.length,u=a("sha1").update(l.alloc(0)).digest(),f=u.length,c=2*f;if(i>r-c-2)throw new Error("message too long");var d=l.alloc(r-i-c-2),p=r-f-1,m=n(f),g=o(l.concat([u,d,l.alloc(1,1),e],p),s(m,p)),y=o(m,s(g,f));return new h(l.concat([l.alloc(1),y,g],r))}(p,e);else if(1===c)d=function(t,e,r){var i,a=e.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");return i=r?l.alloc(s-a-3,255):function(t){for(var e,r=l.allocUnsafe(t),i=0,a=n(2*t),s=0;i<t;)s===a.length&&(a=n(2*t),s=0),(e=a[s++])&&(r[i++]=e);return r}(s-a-3),new h(l.concat([l.from([0,r?1:2]),i,l.alloc(1),e],s))}(p,e,r);else{if(3!==c)throw new Error("unknown padding");if((d=new h(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?f(d,p):u(d,p)}},8903:(t,e,r)=>{var i=r(6698),n=r(8287).Buffer,a=r(2010);function s(t){a.call(this,t),this.enc="pem"}i(s,a),t.exports=s,s.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),i=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,h=-1,u=0;u<r.length;u++){var f=r[u].match(s);if(null!==f&&f[2]===i){if(-1!==o){if("END"!==f[1])break;h=u;break}if("BEGIN"!==f[1])break;o=u}}if(-1===o||-1===h)throw new Error("PEM section not found for: "+i);var l=r.slice(o+1,h).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var c=new n(l,"base64");return a.prototype.decode.call(this,c,e)}},8948:(t,e,r)=>{"use strict";var i=r(7426),n=r(3349);function a(t,e,r){if(!(this instanceof a))return new a(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(e,r))}t.exports=a,a.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},a.prototype.update=function(t,e){return this.inner.update(t,e),this},a.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},8961:(__unused_webpack_module,exports)=>{var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(t),(function(e){r[e]=t[e]})),forEach(globals,(function(e){t[e]&&(r[e]=t[e])}));var a=Object_keys(r),s=i.call(r,this.code);return forEach(Object_keys(r),(function(e){(e in t||-1===indexOf(a,e))&&(t[e]=r[e])})),forEach(globals,(function(e){e in t||defineProp(t,e,r[e])})),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),r},forEach(Object_keys(Script.prototype),(function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(t){return t instanceof Context},exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),e}},8982:()=>{},9095:(t,e,r)=>{var i=r(276);function n(t,e){i.cipher.registerAlgorithm(t,(function(){return new i.des.Algorithm(t,e)}))}r(3900),r(6370),r(7619),t.exports=i.des=i.des||{},i.des.startEncrypting=function(t,e,r,i){var n=p({key:t,output:r,decrypt:!1,mode:i||(null===e?"ECB":"CBC")});return n.start(e),n},i.des.createEncryptionCipher=function(t,e){return p({key:t,output:null,decrypt:!1,mode:e})},i.des.startDecrypting=function(t,e,r,i){var n=p({key:t,output:r,decrypt:!0,mode:i||(null===e?"ECB":"CBC")});return n.start(e),n},i.des.createDecryptionCipher=function(t,e){return p({key:t,output:null,decrypt:!0,mode:e})},i.des.Algorithm=function(t,e){var r=this;r.name=t,r.mode=new e({blockSize:8,cipher:{encrypt:function(t,e){return d(r._keys,t,e,!1)},decrypt:function(t,e){return d(r._keys,t,e,!0)}}}),r._init=!1},i.des.Algorithm.prototype.initialize=function(t){if(!this._init){var e=i.util.createBuffer(t.key);if(0===this.name.indexOf("3DES")&&24!==e.length())throw new Error("Invalid Triple-DES key size: "+8*e.length());this._keys=function(t){for(var e,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],i=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],h=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],f=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],l=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],c=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],m=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=t.length()>8?3:1,y=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,w=0;w<g;w++){var M=t.getInt32(),_=t.getInt32();M^=(e=252645135&(M>>>4^_))<<4,M^=e=65535&((_^=e)>>>-16^M),M^=(e=858993459&(M>>>2^(_^=e<<-16)))<<2,M^=e=65535&((_^=e)>>>-16^M),M^=(e=1431655765&(M>>>1^(_^=e<<-16)))<<1,M^=e=16711935&((_^=e)>>>8^M),e=(M^=(e=1431655765&(M>>>1^(_^=e<<8)))<<1)<<8|(_^=e)>>>20&240,M=_<<24|_<<8&16711680|_>>>8&65280|_>>>24&240,_=e;for(var S=0;S<v.length;++S){v[S]?(M=M<<2|M>>>26,_=_<<2|_>>>26):(M=M<<1|M>>>27,_=_<<1|_>>>27);var E=r[(M&=-15)>>>28]|i[M>>>24&15]|n[M>>>20&15]|a[M>>>16&15]|s[M>>>12&15]|o[M>>>8&15]|h[M>>>4&15],C=u[(_&=-15)>>>28]|f[_>>>24&15]|l[_>>>20&15]|c[_>>>16&15]|d[_>>>12&15]|p[_>>>8&15]|m[_>>>4&15];e=65535&(C>>>16^E),y[b++]=E^e,y[b++]=C^e<<16}}return y}(e),this._init=!0}},n("DES-ECB",i.cipher.modes.ecb),n("DES-CBC",i.cipher.modes.cbc),n("DES-CFB",i.cipher.modes.cfb),n("DES-OFB",i.cipher.modes.ofb),n("DES-CTR",i.cipher.modes.ctr),n("3DES-ECB",i.cipher.modes.ecb),n("3DES-CBC",i.cipher.modes.cbc),n("3DES-CFB",i.cipher.modes.cfb),n("3DES-OFB",i.cipher.modes.ofb),n("3DES-CTR",i.cipher.modes.ctr);var a=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],o=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],h=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],u=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],c=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function d(t,e,r,i){var n,d,p=32===t.length?3:9;n=3===p?i?[30,-2,-2]:[0,32,2]:i?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var m=e[0],g=e[1];m^=(d=252645135&(m>>>4^g))<<4,m^=(d=65535&(m>>>16^(g^=d)))<<16,m^=d=858993459&((g^=d)>>>2^m),m^=d=16711935&((g^=d<<2)>>>8^m),m=(m^=(d=1431655765&(m>>>1^(g^=d<<8)))<<1)<<1|m>>>31,g=(g^=d)<<1|g>>>31;for(var y=0;y<p;y+=3){for(var v=n[y+1],b=n[y+2],w=n[y];w!=v;w+=b){var M=g^t[w],_=(g>>>4|g<<28)^t[w+1];d=m,m=g,g=d^(s[M>>>24&63]|h[M>>>16&63]|f[M>>>8&63]|c[63&M]|a[_>>>24&63]|o[_>>>16&63]|u[_>>>8&63]|l[63&_])}d=m,m=g,g=d}g=g>>>1|g<<31,g^=d=1431655765&((m=m>>>1|m<<31)>>>1^g),g^=(d=16711935&(g>>>8^(m^=d<<1)))<<8,g^=(d=858993459&(g>>>2^(m^=d)))<<2,g^=d=65535&((m^=d)>>>16^g),g^=d=252645135&((m^=d<<16)>>>4^g),m^=d<<4,r[0]=m,r[1]=g}function p(t){var e,r="DES-"+((t=t||{}).mode||"CBC").toUpperCase(),n=(e=t.decrypt?i.cipher.createDecipher(r,t.key):i.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof i.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,n.call(e,r)},e}},9188:(t,e,r)=>{"use strict";var i=r(7011),n=r(8490),a=r(6698),s=r(6677),o=i.assert;function h(t){s.call(this,"short",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,r,i){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(e,16),this.y=new n(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,i){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(e,16),this.y=new n(r,16),this.z=new n(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.zOne=this.z===this.curve.one}a(h,s),t.exports=h,h.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new n(t.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);e=(e=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(t.lambda)r=new n(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(e))?r=a[0]:(r=a[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new n(t.a,16),b:new n(t.b,16)}})):this._getEndoBasis(r)}}},h.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:n.mont(t),r=new n(2).toRed(e).redInvm(),i=r.redNeg(),a=new n(3).toRed(e).redNeg().redSqrt().redMul(r);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},h.prototype._getEndoBasis=function(t){for(var e,r,i,a,s,o,h,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=t,d=this.n.clone(),p=new n(1),m=new n(0),g=new n(0),y=new n(1),v=0;0!==c.cmpn(0);){var b=d.div(c);u=d.sub(b.mul(c)),f=g.sub(b.mul(p));var w=y.sub(b.mul(m));if(!i&&u.cmp(l)<0)e=h.neg(),r=p,i=u.neg(),a=f;else if(i&&2==++v)break;h=u,d=c,c=u,g=p,p=f,y=m,m=w}s=u.neg(),o=f;var M=i.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(M)>=0&&(s=e,o=r),i.negative&&(i=i.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:i,b:a},{a:s,b:o}]},h.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),a=r.b.neg().mul(t).divRound(this.n),s=n.mul(r.a),o=a.mul(i.a),h=n.mul(r.b),u=a.mul(i.b);return{k1:t.sub(s).sub(o),k2:h.add(u).neg()}},h.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(e&&!a||!e&&a)&&(i=i.redNeg()),this.point(t,i)},h.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},h.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a<t.length;a++){var s=this._endoSplit(e[a]),o=t[a],h=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),h=h.neg(!0)),i[2*a]=o,i[2*a+1]=h,n[2*a]=s.k1,n[2*a+1]=s.k2}for(var u=this._wnafMulAdd(1,i,n,2*a,r),f=0;f<2*a;f++)i[f]=null,n[f]=null;return u},a(u,s.BasePoint),h.prototype.point=function(t,e,r){return new u(this,t,e,r)},h.prototype.pointFromJSON=function(t,e){return u.fromJSON(this,t,e)},u.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return e}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;function n(e){return t.point(e[0],e[1],r)}var a=e[2];return i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(n))}},i},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new n(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},u.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(f,s.BasePoint),h.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),a=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),o=i.redSub(n),h=a.redSub(s);if(0===o.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),f=u.redMul(o),l=i.redMul(u),c=h.redSqr().redIAdd(f).redISub(l).redISub(l),d=h.redMul(l.redISub(c)).redISub(a.redMul(f)),p=this.z.redMul(t.z).redMul(o);return this.curve.jpoint(c,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,a=t.y.redMul(e).redMul(this.z),s=r.redSub(i),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),u=h.redMul(s),f=r.redMul(h),l=o.redSqr().redIAdd(u).redISub(f).redISub(f),c=o.redMul(f.redISub(l)).redISub(n.redMul(u)),d=this.z.redMul(s);return this.curve.jpoint(l,c,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var i=this.curve.a,n=this.curve.tinv,a=this.x,s=this.y,o=this.z,h=o.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=a.redSqr(),l=u.redSqr(),c=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(i.redMul(h)),p=a.redMul(l),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(c);var v=u.redMul(o);e+1<t&&(h=h.redMul(c)),a=m,o=v,u=y}return this.curve.jpoint(a,u.redMul(n),o)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i),h=o.redSqr().redISub(s).redISub(s),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=h,e=o.redMul(s.redISub(h)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),c=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(c);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=c.redIAdd(c);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),h=o.redSqr().redISub(s).redISub(s);t=h;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=o.redMul(s.redISub(h)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),c=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=c.redIAdd(c),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),a=e.redSqr(),s=r.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(t.redMul(n)),h=e.redAdd(e),u=(h=h.redIAdd(h)).redMul(s),f=o.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),c=s.redSqr();c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=o.redMul(l).redISub(c),p=r.redAdd(r).redMul(i);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),i=e.redSqr(),n=t.redAdd(t).redIAdd(t),a=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(i),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),h=i.redIAdd(i);h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var u=n.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(h),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(o).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var c=this.y.redMul(u.redMul(h.redISub(u)).redISub(s.redMul(o)));c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(o);return this.curve.jpoint(l,c,d)},f.prototype.mul=function(t,e){return t=new n(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var i=e.redMul(this.z),n=r.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var i=t.clone(),n=this.curve.redN.redMul(e);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},9220:(t,e,r)=>{var i=r(6698);function n(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function a(t,e){this.path=t,this.rethrow(e)}e.a=n,n.prototype.isError=function(t){return t instanceof a},n.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},n.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},n.prototype.enterKey=function(t){return this._reporterState.path.push(t)},n.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},n.prototype.leaveKey=function(t,e,r){var i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[e]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},n.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},n.prototype.error=function(t){var e,r=this._reporterState,i=t instanceof a;if(e=i?t:new a(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return i||r.errors.push(e),e},n.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},i(a,Error),a.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},9247:(t,e,r)=>{var i=r(2509),n=r(2861).Buffer;t.exports=function(t,e){return n.from(t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed().toArray())}},9255:(t,e,r)=>{var i=r(276);r(2746),r(6418),r(2698),r(2385),r(3254),r(5071),r(1417),r(5805),r(7619),r(8392);var n=i.asn1,a=t.exports=i.pki=i.pki||{};a.pemToDer=function(t){var e=i.pem.decode(t)[0];if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return i.util.createBuffer(e.body)},a.privateKeyFromPem=function(t){var e=i.pem.decode(t)[0];if("PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var s=n.fromDer(e.body);return a.privateKeyFromAsn1(s)},a.privateKeyToPem=function(t,e){var r={type:"RSA PRIVATE KEY",body:n.toDer(a.privateKeyToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.privateKeyInfoToPem=function(t,e){var r={type:"PRIVATE KEY",body:n.toDer(t).getBytes()};return i.pem.encode(r,{maxline:e})}},9343:(t,e,r)=>{var i=r(276);r(9504),r(2746),r(9095),r(6418),r(2385),r(9954),r(9356),r(7619),r(8392);var n=i.asn1,a=t.exports=i.pkcs7=i.pkcs7||{};function s(t){var e={},r=[];if(!n.validate(t,a.asn1.recipientInfoValidator,e,r)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=r,s}return{version:e.version.charCodeAt(0),issuer:i.pki.RDNAttributesAsArray(e.issuer),serialNumber:i.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:n.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}function o(t){for(var e,r=[],a=0;a<t.length;++a)r.push((e=t[a],n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(e.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:e.issuer}),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,i.util.hexToBytes(e.serialNumber))]),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.encryptedContent.algorithm).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e.encryptedContent.content)])));return r}function h(t){var e=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:t.issuer}),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,i.util.hexToBytes(t.serialNumber))]),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.digestAlgorithm).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])]);if(t.authenticatedAttributesAsn1&&e.value.push(t.authenticatedAttributesAsn1),e.value.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.signatureAlgorithm).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])),e.value.push(n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,t.signature)),t.unauthenticatedAttributes.length>0){for(var r=n.create(n.Class.CONTEXT_SPECIFIC,1,!0,[]),a=0;a<t.unauthenticatedAttributes.length;++a){var s=t.unauthenticatedAttributes[a];r.values.push(u(s))}e.value.push(r)}return e}function u(t){var e;if(t.type===i.pki.oids.contentType)e=n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.value).getBytes());else if(t.type===i.pki.oids.messageDigest)e=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,t.value.bytes());else if(t.type===i.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),a=new Date("2050-01-01T00:00:00Z"),s=t.value;if("string"==typeof s){var o=Date.parse(s);s=isNaN(o)?13===s.length?n.utcTimeToDate(s):n.generalizedTimeToDate(s):new Date(o)}e=s>=r&&s<a?n.create(n.Class.UNIVERSAL,n.Type.UTCTIME,!1,n.dateToUtcTime(s)):n.create(n.Class.UNIVERSAL,n.Type.GENERALIZEDTIME,!1,n.dateToGeneralizedTime(s))}return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.type).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[e])])}function f(t,e,r){var a={};if(!n.validate(e,r,a,[])){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw s.errors=s,s}if(n.derToOid(a.contentType)!==i.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(a.encryptedContent){var o="";if(i.util.isArray(a.encryptedContent))for(var h=0;h<a.encryptedContent.length;++h){if(a.encryptedContent[h].type!==n.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");o+=a.encryptedContent[h].value}else o=a.encryptedContent;t.encryptedContent={algorithm:n.derToOid(a.encAlgorithm),parameter:i.util.createBuffer(a.encParameter.value),content:i.util.createBuffer(o)}}if(a.content){if(o="",i.util.isArray(a.content))for(h=0;h<a.content.length;++h){if(a.content[h].type!==n.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");o+=a.content[h].value}else o=a.content;t.content=i.util.createBuffer(o)}return t.version=a.version.charCodeAt(0),t.rawCapture=a,a}function l(t){if(void 0===t.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===t.content){var e;switch(t.encryptedContent.algorithm){case i.pki.oids["aes128-CBC"]:case i.pki.oids["aes192-CBC"]:case i.pki.oids["aes256-CBC"]:e=i.aes.createDecryptionCipher(t.encryptedContent.key);break;case i.pki.oids.desCBC:case i.pki.oids["des-EDE3-CBC"]:e=i.des.createDecryptionCipher(t.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+t.encryptedContent.algorithm)}if(e.start(t.encryptedContent.parameter),e.update(t.encryptedContent.content),!e.finish())throw new Error("Symmetric decryption failed.");t.content=e.output}}a.messageFromPem=function(t){var e=i.pem.decode(t)[0];if("PKCS7"!==e.type){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var s=n.fromDer(e.body);return a.messageFromAsn1(s)},a.messageToPem=function(t,e){var r={type:"PKCS7",body:n.toDer(t.toAsn1()).getBytes()};return i.pem.encode(r,{maxline:e})},a.messageFromAsn1=function(t){var e={},r=[];if(!n.validate(t,a.asn1.contentInfoValidator,e,r)){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw s.errors=r,s}var o,h=n.derToOid(e.contentType);switch(h){case i.pki.oids.envelopedData:o=a.createEnvelopedData();break;case i.pki.oids.encryptedData:o=a.createEncryptedData();break;case i.pki.oids.signedData:o=a.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+h+" is not (yet) supported.")}return o.fromAsn1(e.content.value[0]),o},a.createSignedData=function(){var t=null;return t={type:i.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(e){if(f(t,e,a.asn1.signedDataValidator),t.certificates=[],t.crls=[],t.digestAlgorithmIdentifiers=[],t.contentInfo=null,t.signerInfos=[],t.rawCapture.certificates)for(var r=t.rawCapture.certificates.value,n=0;n<r.length;++n)t.certificates.push(i.pki.certificateFromAsn1(r[n]))},toAsn1:function(){t.contentInfo||t.sign();for(var e=[],r=0;r<t.certificates.length;++r)e.push(i.pki.certificateToAsn1(t.certificates[r]));var a=[],s=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,t.digestAlgorithmIdentifiers),t.contentInfo])]);return e.length>0&&s.value[0].value.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,e)),a.length>0&&s.value[0].value.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,a)),s.value[0].value.push(n.create(n.Class.UNIVERSAL,n.Type.SET,!0,t.signerInfos)),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.type).getBytes()),s])},addSigner:function(e){var r=e.issuer,n=e.serialNumber;if(e.certificate){var a=e.certificate;"string"==typeof a&&(a=i.pki.certificateFromPem(a)),r=a.issuer.attributes,n=a.serialNumber}var s=e.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=i.pki.privateKeyFromPem(s));var o=e.digestAlgorithm||i.pki.oids.sha1;switch(o){case i.pki.oids.sha1:case i.pki.oids.sha256:case i.pki.oids.sha384:case i.pki.oids.sha512:case i.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+o)}var h=e.authenticatedAttributes||[];if(h.length>0){for(var u=!1,f=!1,l=0;l<h.length;++l){var c=h[l];if(u||c.type!==i.pki.oids.contentType){if(f||c.type!==i.pki.oids.messageDigest);else if(f=!0,u)break}else if(u=!0,f)break}if(!u||!f)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}t.signers.push({key:s,version:1,issuer:r,serialNumber:n,digestAlgorithm:o,signatureAlgorithm:i.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:h,unauthenticatedAttributes:[]})},sign:function(e){var r;e=e||{},("object"!=typeof t.content||null===t.contentInfo)&&(t.contentInfo=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pki.oids.data).getBytes())]),"content"in t&&(t.content instanceof i.util.ByteBuffer?r=t.content.bytes():"string"==typeof t.content&&(r=i.util.encodeUtf8(t.content)),e.detached?t.detachedContent=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,r):t.contentInfo.value.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,r)])))),0!==t.signers.length&&function(e){var r;if(!(r=t.detachedContent?t.detachedContent:(r=t.contentInfo.value[1]).value[0]))throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var a=n.derToOid(t.contentInfo.value[0].value),s=n.toDer(r);for(var o in s.getByte(),n.getBerValueLength(s),s=s.getBytes(),e)e[o].start().update(s);for(var f=new Date,l=0;l<t.signers.length;++l){var c=t.signers[l];if(0===c.authenticatedAttributes.length){if(a!==i.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{c.authenticatedAttributesAsn1=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var d=n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[]),p=0;p<c.authenticatedAttributes.length;++p){var m=c.authenticatedAttributes[p];m.type===i.pki.oids.messageDigest?m.value=e[c.digestAlgorithm].digest():m.type===i.pki.oids.signingTime&&(m.value||(m.value=f)),d.value.push(u(m)),c.authenticatedAttributesAsn1.value.push(u(m))}s=n.toDer(d).getBytes(),c.md.start().update(s)}c.signature=c.key.sign(c.md,"RSASSA-PKCS1-V1_5")}t.signerInfos=function(t){for(var e=[],r=0;r<t.length;++r)e.push(h(t[r]));return e}(t.signers)}(function(){for(var e={},r=0;r<t.signers.length;++r){var a=t.signers[r];(s=a.digestAlgorithm)in e||(e[s]=i.md[i.pki.oids[s]].create()),0===a.authenticatedAttributes.length?a.md=e[s]:a.md=i.md[i.pki.oids[s]].create()}for(var s in t.digestAlgorithmIdentifiers=[],e)t.digestAlgorithmIdentifiers.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(s).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]));return e}())},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(e){"string"==typeof e&&(e=i.pki.certificateFromPem(e)),t.certificates.push(e)},addCertificateRevokationList:function(t){throw new Error("PKCS#7 CRL support not yet implemented.")}}},a.createEncryptedData=function(){var t=null;return t={type:i.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(e){f(t,e,a.asn1.encryptedDataValidator)},decrypt:function(e){void 0!==e&&(t.encryptedContent.key=e),l(t)}}},a.createEnvelopedData=function(){var t=null;return t={type:i.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(e){var r=f(t,e,a.asn1.envelopedDataValidator);t.recipients=function(t){for(var e=[],r=0;r<t.length;++r)e.push(s(t[r]));return e}(r.recipientInfos.value)},toAsn1:function(){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.type).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,o(t.recipients)),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,(e=t.encryptedContent,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pki.oids.data).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.algorithm).getBytes()),e.parameter?n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e.content.getBytes())])]))])])]);var e},findRecipient:function(e){for(var r=e.issuer.attributes,i=0;i<t.recipients.length;++i){var n=t.recipients[i],a=n.issuer;if(n.serialNumber===e.serialNumber&&a.length===r.length){for(var s=!0,o=0;o<r.length;++o)if(a[o].type!==r[o].type||a[o].value!==r[o].value){s=!1;break}if(s)return n}}return null},decrypt:function(e,r){if(void 0===t.encryptedContent.key&&void 0!==e&&void 0!==r)switch(e.encryptedContent.algorithm){case i.pki.oids.rsaEncryption:case i.pki.oids.desCBC:var n=r.decrypt(e.encryptedContent.content);t.encryptedContent.key=i.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}l(t)},addRecipient:function(e){t.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:i.pki.oids.rsaEncryption,key:e.publicKey}})},encrypt:function(e,r){if(void 0===t.encryptedContent.content){var n,a,s;switch(r=r||t.encryptedContent.algorithm,e=e||t.encryptedContent.key,r){case i.pki.oids["aes128-CBC"]:n=16,a=16,s=i.aes.createEncryptionCipher;break;case i.pki.oids["aes192-CBC"]:n=24,a=16,s=i.aes.createEncryptionCipher;break;case i.pki.oids["aes256-CBC"]:n=32,a=16,s=i.aes.createEncryptionCipher;break;case i.pki.oids["des-EDE3-CBC"]:n=24,a=8,s=i.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(void 0===e)e=i.util.createBuffer(i.random.getBytes(n));else if(e.length()!=n)throw new Error("Symmetric key has wrong length; got "+e.length()+" bytes, expected "+n+".");t.encryptedContent.algorithm=r,t.encryptedContent.key=e,t.encryptedContent.parameter=i.util.createBuffer(i.random.getBytes(a));var o=s(e);if(o.start(t.encryptedContent.parameter.copy()),o.update(t.content),!o.finish())throw new Error("Symmetric encryption failed.");t.encryptedContent.content=o.output}for(var h=0;h<t.recipients.length;++h){var u=t.recipients[h];if(void 0===u.encryptedContent.content){if(u.encryptedContent.algorithm!==i.pki.oids.rsaEncryption)throw new Error("Unsupported asymmetric cipher, OID "+u.encryptedContent.algorithm);u.encryptedContent.content=u.encryptedContent.key.encrypt(t.encryptedContent.key.data)}}}}}},9356:(t,e,r)=>{var i=r(276);r(9504),r(172),r(3878),r(7619),i.random&&i.random.getBytes?t.exports=i.random:function(e){var r={},n=new Array(4),a=i.util.createBuffer();function s(){var t=i.prng.create(r);return t.getBytes=function(e,r){return t.generate(e,r)},t.getBytesSync=function(e){return t.generate(e)},t}r.formatKey=function(t){var e=i.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),i.aes._expandKey(t,!1)},r.formatSeed=function(t){var e=i.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),t},r.cipher=function(t,e){return i.aes._updateBlock(t,e,n,!1),a.putInt32(n[0]),a.putInt32(n[1]),a.putInt32(n[2]),a.putInt32(n[3]),a.getBytes()},r.increment=function(t){return++t[3],t},r.md=i.md.sha256;var o=s(),h=null,u=i.util.globalScope,f=u.crypto||u.msCrypto;if(f&&f.getRandomValues&&(h=function(t){return f.getRandomValues(t)}),i.options.usePureJavaScript||!i.util.isNodejs&&!h){if("undefined"==typeof window||window.document,o.collectInt(+new Date,32),"undefined"!=typeof navigator){var l="";for(var c in navigator)try{"string"==typeof navigator[c]&&(l+=navigator[c])}catch(t){}o.collect(l),l=null}e&&(e().mousemove((function(t){o.collectInt(t.clientX,16),o.collectInt(t.clientY,16)})),e().keypress((function(t){o.collectInt(t.charCode,8)})))}if(i.random)for(var c in o)i.random[c]=o[c];else i.random=o;i.random.createInstance=s,t.exports=i.random}("undefined"!=typeof jQuery?jQuery:null)},9368:()=>{},9404:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,n){for(var a=0,s=0,o=Math.min(t.length,r),h=e;h<o;h++){var u=t.charCodeAt(h)-48;a*=n,s=u>=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&s<n,"Invalid character"),a+=s}return a}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype._move=function(t){f(t,this)},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(t){a.prototype.inspect=l}else a.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r._strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?c[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?m+r:c[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,a);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},a.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,a=0;n<this.length;n++){var s=this.words[n]<<a|i;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===a?(r<t.length&&(t[r++]=s>>24&255),i=0,a=0):(i=s>>>24,a+=2)}if(r<t.length)for(t[r++]=i;r<t.length;)t[r++]=0},a.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,i=0,n=0,a=0;n<this.length;n++){var s=this.words[n]<<a|i;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===a?(r>=0&&(t[r--]=s>>24&255),i=0,a=0):(i=s>>>24,a+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this._strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,D=x>>>13,P=0|s[9],O=8191&P,K=P>>>13,j=0|o[0],q=8191&j,V=j>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(D,q)|0,a=Math.imul(D,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(K,q)|0,a=Math.imul(K,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(D,z)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(K,z)|0,a=Math.imul(K,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(D,Z)|0,a=a+Math.imul(D,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(K,Z)|0,a=Math.imul(K,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(K,Y)|0,a=Math.imul(K,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(K,$)|0,a=Math.imul(K,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(K,rt)|0,a=Math.imul(K,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(K,at)|0,a=Math.imul(K,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(D,ht)|0,a=a+Math.imul(D,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(K,ht)|0,a=Math.imul(K,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(K,lt)|0,a=Math.imul(K,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(K,pt)|0))<<13)|0;return u=((a=Math.imul(K,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r._strip()}function v(t,e,r){return y(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?y(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},b.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},b.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},b.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},b.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),v(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var a=(0|this.words[n])*t,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=t.words[i]>>>n&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this._strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o._strip(),i._strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,a=this.length-1;a>=0;a--)n=(r*n+(0|this.words[a]))%t;return e?-n:n},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*r;this.words[n]=a/t|0,r=a%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new A(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function M(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function T(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}M.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},M.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(t,e){t.iushrn(this.n,0,e)},M.prototype.imulK=function(t){return t.imul(this.k)},n(_,M),_.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(S,M),n(E,M),n(C,M),C.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return w[t]=e,e},A.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new T(t)},n(T,A),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},9504:(t,e,r)=>{var i=r(276);function n(t,e){i.cipher.registerAlgorithm(t,(function(){return new i.aes.Algorithm(t,e)}))}r(3900),r(6370),r(7619),t.exports=i.aes=i.aes||{},i.aes.startEncrypting=function(t,e,r,i){var n=m({key:t,output:r,decrypt:!1,mode:i});return n.start(e),n},i.aes.createEncryptionCipher=function(t,e){return m({key:t,output:null,decrypt:!1,mode:e})},i.aes.startDecrypting=function(t,e,r,i){var n=m({key:t,output:r,decrypt:!0,mode:i});return n.start(e),n},i.aes.createDecryptionCipher=function(t,e){return m({key:t,output:null,decrypt:!0,mode:e})},i.aes.Algorithm=function(t,e){f||c();var r=this;r.name=t,r.mode=new e({blockSize:16,cipher:{encrypt:function(t,e){return p(r._w,t,e,!1)},decrypt:function(t,e){return p(r._w,t,e,!0)}}}),r._init=!1},i.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e,r=t.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(i.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){e=r,r=i.util.createBuffer();for(var n=0;n<e.length;++n)r.putByte(e[n])}}else r=i.util.createBuffer(r);if(!i.util.isArray(r)){e=r,r=[];var a=e.length();if(16===a||24===a||32===a)for(a>>>=2,n=0;n<a;++n)r.push(e.getInt32())}if(!i.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var s=this.mode.name,o=-1!==["CFB","OFB","CTR","GCM"].indexOf(s);this._w=d(r,t.decrypt&&!o),this._init=!0}},i.aes._expandKey=function(t,e){return f||c(),d(t,e)},i.aes._updateBlock=p,n("AES-ECB",i.cipher.modes.ecb),n("AES-CBC",i.cipher.modes.cbc),n("AES-CFB",i.cipher.modes.cfb),n("AES-OFB",i.cipher.modes.ofb),n("AES-CTR",i.cipher.modes.ctr),n("AES-GCM",i.cipher.modes.gcm);var a,s,o,h,u,f=!1,l=4;function c(){f=!0,o=[0,1,2,4,8,16,32,64,128,27,54];for(var t=new Array(256),e=0;e<128;++e)t[e]=e<<1,t[e+128]=e+128<<1^283;for(a=new Array(256),s=new Array(256),h=new Array(4),u=new Array(4),e=0;e<4;++e)h[e]=new Array(256),u[e]=new Array(256);var r,i,n,l,c,d,p,m=0,g=0;for(e=0;e<256;++e){l=(l=g^g<<1^g<<2^g<<3^g<<4)>>8^255&l^99,a[m]=l,s[l]=m,d=(c=t[l])<<24^l<<16^l<<8^l^c,p=((r=t[m])^(i=t[r])^(n=t[i]))<<24^(m^n)<<16^(m^i^n)<<8^m^r^n;for(var y=0;y<4;++y)h[y][m]=d,u[y][l]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;0===m?m=g=1:(m=r^t[t[t[r^n]]],g^=t[t[g]])}}function d(t,e){for(var r,i=t.slice(0),n=1,s=i.length,h=l*(s+6+1),f=s;f<h;++f)r=i[f-1],f%s==0?(r=a[r>>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^o[n]<<24,n++):s>6&&f%s==4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),i[f]=i[f-s]^r;if(e){for(var c,d=u[0],p=u[1],m=u[2],g=u[3],y=i.slice(0),v=(f=0,(h=i.length)-l);f<h;f+=l,v-=l)if(0===f||f===h-l)y[f]=i[v],y[f+1]=i[v+3],y[f+2]=i[v+2],y[f+3]=i[v+1];else for(var b=0;b<l;++b)c=i[v+b],y[f+(3&-b)]=d[a[c>>>24]]^p[a[c>>>16&255]]^m[a[c>>>8&255]]^g[a[255&c]];i=y}return i}function p(t,e,r,i){var n,o,f,l,c,d,p,m,g,y,v,b,w=t.length/4-1;i?(n=u[0],o=u[1],f=u[2],l=u[3],c=s):(n=h[0],o=h[1],f=h[2],l=h[3],c=a),d=e[0]^t[0],p=e[i?3:1]^t[1],m=e[2]^t[2],g=e[i?1:3]^t[3];for(var M=3,_=1;_<w;++_)y=n[d>>>24]^o[p>>>16&255]^f[m>>>8&255]^l[255&g]^t[++M],v=n[p>>>24]^o[m>>>16&255]^f[g>>>8&255]^l[255&d]^t[++M],b=n[m>>>24]^o[g>>>16&255]^f[d>>>8&255]^l[255&p]^t[++M],g=n[g>>>24]^o[d>>>16&255]^f[p>>>8&255]^l[255&m]^t[++M],d=y,p=v,m=b;r[0]=c[d>>>24]<<24^c[p>>>16&255]<<16^c[m>>>8&255]<<8^c[255&g]^t[++M],r[i?3:1]=c[p>>>24]<<24^c[m>>>16&255]<<16^c[g>>>8&255]<<8^c[255&d]^t[++M],r[2]=c[m>>>24]<<24^c[g>>>16&255]<<16^c[d>>>8&255]<<8^c[255&p]^t[++M],r[i?1:3]=c[g>>>24]<<24^c[d>>>16&255]<<16^c[p>>>8&255]<<8^c[255&m]^t[++M]}function m(t){var e,r="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),n=(e=t.decrypt?i.cipher.createDecipher(r,t.key):i.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof i.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,n.call(e,r)},e}},9547:(t,e,r)=>{t.exports=r(276),r(9504),r(8678),r(2746),r(3900),r(9095),r(2926),r(1696),r(3432),r(2045),r(1355),r(5250),r(3254),r(2385),r(7501),r(5071),r(9343),r(9255),r(268),r(3878),r(1417),r(9356),r(5124),r(149),r(3986),r(7619)},9560:(t,e,r)=>{"use strict";e.utils=r(7626),e.Cipher=r(2808),e.DES=r(2211),e.CBC=r(3389),e.EDE=r(5279)},9673:(t,e,r)=>{var i=e;i.Reporter=r(9220).a,i.DecoderBuffer=r(7227).t,i.EncoderBuffer=r(7227).d,i.Node=r(993)},9838:()=>{},9954:(t,e,r)=>{var i=r(276);r(2746),r(7619);var n=i.asn1,a=t.exports=i.pkcs7asn1=i.pkcs7asn1||{};i.pkcs7=i.pkcs7||{},i.pkcs7.asn1=a;var s={name:"ContentInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};a.contentInfoValidator=s;var o={name:"EncryptedContentInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:n.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};a.envelopedDataValidator={name:"EnvelopedData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(o)},a.encryptedDataValidator={name:"EncryptedData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"}].concat(o)};var h={name:"SignerInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:n.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};a.signedDataValidator={name:"SignedData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,capture:"signerInfos",optional:!0,value:[h]}]},a.recipientInfoValidator={name:"RecipientInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:n.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}getProto=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);__webpack_require__.r(r);var i={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var n=2&e&&t;"object"==typeof n&&!~leafPrototypes.indexOf(n);n=getProto(n))Object.getOwnPropertyNames(n).forEach((e=>i[e]=()=>t[e]));return i.default=()=>t,__webpack_require__.d(r,i),r},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var __webpack_exports__={};(()=>{"use strict";async function t(t,e,r){const i=[];t.replace(e,((t,...e)=>(i.push(r(t,...e)),t)));const n=await Promise.all(i);return t.replace(e,(()=>n.shift()))}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{TinyCertCrypto:()=>C,TinyCrypto:()=>S,TinyLevelUp:()=>e,asyncReplace:()=>t,cloneObjTypeOrder:()=>l,countObj:()=>p,extendObjType:()=>u,formatCustomTimer:()=>n,formatDayTimer:()=>s,formatTimer:()=>a,getAge:()=>y,getSimplePerc:()=>g,getTimeDuration:()=>i,objType:()=>d,reorderObjTypeOrder:()=>f,ruleOfThree:()=>m,shuffleArray:()=>r,toTitleCase:()=>v,toTitleCaseLowerFirst:()=>b});const e=class{constructor(t,e){this.giveExp=t,this.expLevel=e}expValidator(t){let e=0;const r=this.expLevel*t.level;return t.exp>=r&&(t.level++,e=t.exp-r,t.exp=0,e>0)?this.give(t,e,"extra"):t.exp<1&&t.level>1&&(t.level--,e=Math.abs(t.exp),t.exp=this.expLevel*t.level,e>0)?this.remove(t,e,"extra"):t}getTotalExp(t){let e=0;for(let r=1;r<=t.level;r++)e+=this.expLevel*r;return e+=t.exp,e}expGenerator(t=1){return Math.floor(Math.random()*this.giveExp)+1*t}progress(t){return this.expLevel*t.level}getProgress(t){return this.expLevel*t.level}set(t,e){return t.exp=e,this.expValidator(t),t.totalExp=this.getTotalExp(t),t}give(t,e=0,r="add",i=1){return"add"===r?t.exp+=this.expGenerator(i)+e:"extra"===r&&(t.exp+=e),this.expValidator(t),t.totalExp=this.getTotalExp(t),t}remove(t,e=0,r="add",i=1){return"add"===r?t.exp-=this.expGenerator(i)+e:"extra"===r&&(t.exp-=e),this.expValidator(t),t.totalExp=this.getTotalExp(t),t}};function r(t){let e,r=t.length;for(;0!==r;)e=Math.floor(Math.random()*r),r--,[t[r],t[e]]=[t[e],t[r]];return t}function i(t=new Date,e="asSeconds",r=null){if(t instanceof Date){const i=t-(r instanceof Date?r:new Date);switch(e){case"asMilliseconds":return i;case"asSeconds":default:return i/1e3;case"asMinutes":return i/6e4;case"asHours":return i/36e5;case"asDays":return i/864e5}}return null}function n(t,e="seconds",r="{time}"){t=Math.max(0,Math.floor(t));const i=["seconds","minutes","hours","days","months","years"].indexOf(e),n=i>=5,a=i>=4,s=i>=3,o=i>=2,h=i>=1,u=i>=0,f={years:n?0:NaN,months:a?0:NaN,days:s?0:NaN,hours:o?0:NaN,minutes:h?0:NaN,seconds:u?0:NaN,total:NaN};let l=t;if(n||a||s){const t=new Date(1980,0,1),e=new Date(t.getTime()+1e3*l),r=new Date(t);if(n)for(;new Date(r.getFullYear()+1,r.getMonth(),r.getDate())<=e;)r.setFullYear(r.getFullYear()+1),f.years++;if(a)for(;new Date(r.getFullYear(),r.getMonth()+1,r.getDate())<=e;)r.setMonth(r.getMonth()+1),f.months++;if(s)for(;new Date(r.getFullYear(),r.getMonth(),r.getDate()+1)<=e;)r.setDate(r.getDate()+1),f.days++;l=Math.floor((e-r)/1e3)}o&&(f.hours=Math.floor(l/3600),l%=3600),h&&(f.minutes=Math.floor(l/60),l%=60),u&&(f.seconds=l);const c={seconds:u?t:NaN,minutes:h?t/60:NaN,hours:o?t/3600:NaN,days:s?t/86400:NaN,months:a?12*f.years+f.months+(f.days||0)/30:NaN,years:n?f.years+(f.months||0)/12+(f.days||0)/365:NaN};f.total=+(c[e]||0).toFixed(2).replace(/\.00$/,"");const d=t=>isNaN(t)?"NaN":String(t).padStart(2,"0"),p=[o?d(f.hours):null,h?d(f.minutes):null,u?d(f.seconds):null].filter((t=>null!==t)).join(":");return r.replace(/\{years\}/g,f.years).replace(/\{months\}/g,f.months).replace(/\{days\}/g,f.days).replace(/\{hours\}/g,d(f.hours)).replace(/\{minutes\}/g,d(f.minutes)).replace(/\{seconds\}/g,d(f.seconds)).replace(/\{time\}/g,p).replace(/\{total\}/g,f.total).trim()}function a(t){return n(t,"hours","{hours}:{minutes}:{seconds}")}function s(t){return n(t,"days","{days}d {hours}:{minutes}:{seconds}")}var o=__webpack_require__(8287);const h={items:{undefined:t=>void 0===t,null:t=>null===t,boolean:t=>"boolean"==typeof t,number:t=>"number"==typeof t&&!isNaN(t),bigint:t=>"bigint"==typeof t,string:t=>"string"==typeof t,symbol:t=>"symbol"==typeof t,function:t=>"function"==typeof t,array:t=>Array.isArray(t),date:t=>t instanceof Date,regexp:t=>t instanceof RegExp,map:t=>t instanceof Map,set:t=>t instanceof Set,weakmap:t=>t instanceof WeakMap,weakset:t=>t instanceof WeakSet,promise:t=>t instanceof Promise,buffer:t=>void 0!==o.Buffer&&o.Buffer.isBuffer(t),htmlelement:t=>"undefined"!=typeof HTMLElement&&t instanceof HTMLElement,object:t=>"object"==typeof t&&null!==t},order:["undefined","null","boolean","number","bigint","string","symbol","function","array","buffer","date","regexp","map","set","weakmap","weakset","promise","htmlelement","object"]};function u(t,e){const r=[];for(const[i,n]of Object.entries(t))if(!h.items.hasOwnProperty(i)){h.items[i]=n;let t="number"==typeof e?e:-1;if(-1===t){const e=h.order.indexOf("object");t=e>-1?e:h.order.length}t=Math.min(Math.max(0,t),h.order.length),h.order.splice(t,0,i),r.push(i)}return r}function f(t){const e=[...h.order];return!!t.every((t=>e.includes(t)))&&(h.order=t.slice(),!0)}function l(){return[...h.order]}const c=t=>{if(null===t)return"null";for(const e of h.order)if(!h.items[e]||h.items[e](t))return e;return"unknown"};function d(t,e){if(void 0===t)return null;const r=c(t);return"string"==typeof e?r===e.toLowerCase():r}function p(t){return Array.isArray(t)?t.length:d(t,"object")?Object.keys(t).length:0}function m(t,e,r,i){return i?Number(t*e)/r:Number(r*e)/t}function g(t,e){return t*(e/100)}function y(t=0,e=null){if(null!=t&&0!==t){const r=new Date(t);if(isNaN(r))return null;const i=e instanceof Date?e:new Date;let n=i.getFullYear()-r.getFullYear();const a=i.getMonth(),s=r.getMonth(),o=i.getDate(),h=r.getDate();return(a<s||a===s&&o<h)&&n--,Math.abs(n)}return null}function v(t){return t.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()))}function b(t){const e=t.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()));return e.charAt(0).toLowerCase()+e.slice(1)}var w=__webpack_require__(1565),M=__webpack_require__(3766);const _="undefined"!=typeof window&&void 0!==window.document,S=class{constructor(t={}){this.algorithm=t.algorithm||"aes-256-gcm",this.outputEncoding=t.outputEncoding||"hex",this.inputEncoding=t.inputEncoding||"utf8",this.authTagLength=t.authTagLength||16,this.key=t.key||this.generateKey()}generateKey(t=32){return w.randomBytes(t)}generateIV(t=12){return w.randomBytes(t)}encrypt(t,e=this.generateIV()){const r=this.#t(t),i=w.createCipheriv(this.algorithm,this.key,e,{authTagLength:this.authTagLength});let n=i.update(r,this.inputEncoding);n=o.Buffer.concat([n,i.final()]);const a=i.getAuthTag();return{iv:e.toString(this.outputEncoding),encrypted:n.toString(this.outputEncoding),authTag:a.toString(this.outputEncoding)}}decrypt({iv:t,encrypted:e,authTag:r},i=null){const n=o.Buffer.from(t,this.outputEncoding),a=o.Buffer.from(e,this.outputEncoding),s=o.Buffer.from(r,this.outputEncoding),h=w.createDecipheriv(this.algorithm,this.key,n,{authTagLength:this.authTagLength});h.setAuthTag(s);let u=h.update(a,null,this.inputEncoding);u+=h.final(this.inputEncoding);const{value:f,type:l}=this.#e(u);return i&&this.#r(i,l),f}getTypeFromEncrypted({iv:t,encrypted:e,authTag:r}){const i=o.Buffer.from(t,this.outputEncoding),n=o.Buffer.from(e,this.outputEncoding),a=o.Buffer.from(r,this.outputEncoding),s=w.createDecipheriv(this.algorithm,this.key,i,{authTagLength:this.authTagLength});s.setAuthTag(a);let h=s.update(n,null,this.inputEncoding);h+=s.final(this.inputEncoding);const{type:u}=this.#e(h);return"string"==typeof u?u:"unknown"}saveKeyToFile(t="secret.key"){const e=this.key.toString("hex");if(_){const r=new Blob([e],{type:"text/plain"}),i=URL.createObjectURL(r),n=document.createElement("a");n.href=i,n.download=t,n.click(),URL.revokeObjectURL(i)}else M.writeFileSync(t,e)}saveConfigToFile(t="crypto-config.json"){const e=JSON.stringify(this.exportConfig(),null,2);if(_){const r=new Blob([e],{type:"application/json"}),i=URL.createObjectURL(r),n=document.createElement("a");n.href=i,n.download=t,n.click(),URL.revokeObjectURL(i)}else M.writeFileSync(t,e)}async loadConfigFromFile(t){if(_)return new Promise(((e,r)=>{const i=new FileReader;i.onload=()=>{try{const t=JSON.parse(i.result);e(this.importConfig(t))}catch(t){r(new Error("Invalid config JSON file"))}},i.onerror=()=>r(i.error),i.readAsText(t)}));{const e=M.readFileSync(t,"utf8"),r=JSON.parse(e);return this.importConfig(r)}}async loadKeyFromFile(t){if(_)return new Promise(((e,r)=>{const i=new FileReader;i.onload=()=>{const t=i.result.trim(),r=o.Buffer.from(t,"hex");this.key=r,e(r)},i.onerror=()=>r(i.error),i.readAsText(t)}));{const e=M.readFileSync(t,"utf8"),r=o.Buffer.from(e,"hex");return this.key=r,r}}exportConfig(){return{algorithm:this.algorithm,outputEncoding:this.outputEncoding,inputEncoding:this.inputEncoding,key:this.key.toString("hex"),authTagLength:this.authTagLength}}importConfig(t){if("string"==typeof t.algorithm)this.algorithm=t.algorithm;else if(void 0!==t.algorithm)throw new Error('Invalid or missing "algorithm" property. Expected a string.');if("string"==typeof t.outputEncoding)this.outputEncoding=t.outputEncoding;else if(void 0!==t.outputEncoding)throw new Error('Invalid or missing "outputEncoding" property. Expected a string.');if("string"==typeof t.inputEncoding)this.inputEncoding=t.inputEncoding;else if(void 0!==t.inputEncoding)throw new Error('Invalid or missing "inputEncoding" property. Expected a string.');if("number"==typeof t.authTagLength)this.authTagLength=t.authTagLength;else if(void 0!==t.authTagLength)throw new Error('Invalid or missing "authTagLength" property. Expected a number.');if("string"==typeof t.key)this.key=o.Buffer.from(t.key,"hex");else if(void 0!==t.key)throw new Error('Invalid or missing "key" property. Expected a hexadecimal string.')}#i={weakmap:()=>{throw new Error("WeakMap cannot be serialized")},weakset:()=>{throw new Error("WeakSet cannot be serialized")},promise:()=>{throw new Error("Promise cannot be serialized")},function:()=>{throw new Error("Function cannot be serialized")},regexp:t=>JSON.stringify({__type:"regexp",value:t.toString()}),htmlElement:t=>JSON.stringify({__type:"htmlelement",value:t.outerHTML}),date:t=>JSON.stringify({__type:"date",value:t.toISOString()}),bigint:t=>JSON.stringify({__type:"bigint",value:t.toString()}),number:t=>JSON.stringify({__type:"number",value:t}),boolean:t=>JSON.stringify({__type:"boolean",value:t}),string:t=>JSON.stringify({__type:"string",value:t}),null:t=>JSON.stringify({__type:"null"}),undefined:t=>JSON.stringify({__type:"undefined"}),map:t=>JSON.stringify({__type:"map",value:Array.from(t.entries())}),set:t=>JSON.stringify({__type:"set",value:Array.from(t.values())}),symbol:t=>JSON.stringify({__type:"symbol",value:t.description}),array:t=>JSON.stringify({__type:"array",value:t}),object:t=>JSON.stringify({__type:"object",value:t}),buffer:t=>JSON.stringify({__type:"buffer",value:t.toString("base64")})};#n={regexp:t=>{const e=t.match(/^\/(.*)\/([gimsuy]*)$/);return e?new RegExp(e[1],e[2]):new RegExp(t)},htmlelement:t=>{if("undefined"==typeof document)throw new Error("HTMLElement deserialization is only supported in browsers");const e=document.createElement("div");return e.innerHTML=t,e.firstElementChild},date:t=>new Date(t),bigint:t=>BigInt(t),number:t=>Number(t),boolean:t=>Boolean(t),null:t=>null,undefined:t=>{},map:t=>new Map(t),set:t=>new Set(t),symbol:t=>Symbol(t),array:t=>t,object:t=>t,string:t=>String(t),buffer:t=>o.Buffer.from(t,"base64")};#t(t){const e=d(t)||"undefined";if(this.#i[e])return this.#i[e](t);throw new Error(`Unsupported data type for encryption: ${e}`)}#e(t){try{const e=JSON.parse(t),r=e.__type;return"string"!=typeof r?{value:t,type:"string"}:"function"==typeof this.#n[r]?{value:this.#n[r](e.value),type:r}:{value:t,type:"Unknown"}}catch{return{value:t,type:"Unknown"}}}#r(t,e){if(t!==e)throw new Error(`Type mismatch: expected ${t}, but got ${e}`)}},E="undefined"!=typeof window&&void 0!==window.document,C=class{#a=/-----BEGIN CERTIFICATE-----([\s\S]+?)-----END CERTIFICATE-----/;#s=/-----BEGIN\s+(?:RSA\s+)?(PUBLIC|PRIVATE)\s+KEY-----([\s\S]+?)-----END\s+(?:RSA\s+)?\1\s+KEY-----/;constructor({publicCertPath:t=null,privateKeyPath:e=null,publicCertBuffer:r=null,privateKeyBuffer:i=null,cryptoType:n="RSA-OAEP"}={}){if(!t&&!r&&E)throw new Error("In browser, publicCertPath or publicCertBuffer must be provided");if(r&&"string"!=typeof r&&!o.Buffer.isBuffer(r))throw new TypeError("publicCertBuffer must be a string or Buffer");if(i&&"string"!=typeof i&&!o.Buffer.isBuffer(i))throw new TypeError("privateKeyBuffer must be a string or Buffer");this.source=null,this.cryptoType=n,this.publicCertPath=t,this.privateKeyPath=e,this.publicCertBuffer=r,this.privateKeyBuffer=i,this.publicKey=null,this.privateKey=null,this.publicCert=null,this.metadata=null,this.forge=null}async#o(){if(!this.forge){const t=await Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,9547,19));this.forge=t.default}return this.#h()}async fetchNodeForge(){return this.#o()}#h(){return this.forge}getNodeForge(){return this.#h()}#u(t){if(this.#a.test(t))return"certificate";const e=this.#s.exec(t);return e?e[1].toLowerCase()+"_key":"unknown"}async generateX509Cert(t,e={}){if(this.publicKey||this.privateKey||this.publicCert)throw new Error("A certificate is already loaded into the instance.");const{pki:r}=await this.#o(),{modulusLength:i=2048,publicKeyEncoding:n={type:"spki",format:"pem"},privateKeyEncoding:a={type:"pkcs8",format:"pem"},validityInYears:s=1,randomBytesLength:o=16}=e,h=e.publicKeyType||n.type,u=e.privateKeyType||a.type;if(E)throw new Error("generateKeyPair can only be used in Node.js environments");const{publicKey:f,privateKey:l}=w.generateKeyPairSync("rsa",{modulusLength:i,publicKeyEncoding:{...n,type:h},privateKeyEncoding:{...a,type:u}}),{cert:c,publicPem:d,privatePem:p}=this.#f(t,f,l,s,o);return this.publicKey=d,this.privateKey=p,this.publicCertPath="MEMORY",this.privateKeyPath="MEMORY",this.source="memory",this.publicCertBuffer=f,this.privateKeyBuffer=l,this.#l(c),{publicKey:f,privateKey:l,cert:c}}#f(t,e,r,i,n){const{pki:a}=this.forge,s=a.createCertificate(),h=a.publicKeyFromPem(e),u=a.privateKeyFromPem(r);s.publicKey=h,s.serialNumber=o.Buffer.from(w.randomBytes(n)).toString("hex"),s.validity.notBefore=new Date,s.validity.notAfter=new Date,s.validity.notAfter.setFullYear(s.validity.notBefore.getFullYear()+i);const f=[];for(const e in t)f.push({name:e,value:t[e]});return s.setSubject(f),s.setIssuer(f),s.sign(u),{cert:a.certificateToPem(s),publicPem:h,privatePem:u}}async init(){if(this.publicKey||this.privateKey||this.publicCert)throw new Error("A certificate is already loaded into the instance.");if(!this.publicCertPath&&!this.publicCertBuffer)throw new Error("Public certificate is required to initialize");this.metadata={};const{pki:t}=await this.#o(),e=e=>{const r=this.#u(e);if("certificate"===r){const r=t.certificateFromPem(e);this.publicKey=r.publicKey,this.#l(r)}else{if("public_key"!==r)throw new Error("Public key is required to initialize");this.publicKey=t.publicKeyFromPem(e)}},r=e=>{if("private_key"!==this.#u(e))throw new Error("Private key is required to initialize");this.privateKey=t.privateKeyFromPem(e)};if(E)e(this.publicCertBuffer?"string"==typeof this.publicCertBuffer?this.publicCertBuffer:(new TextDecoder).decode(this.publicCertBuffer):await fetch(this.publicCertPath).then((t=>t.text()))),(this.privateKeyPath||this.privateKeyBuffer)&&r(this.privateKeyBuffer?"string"==typeof this.privateKeyBuffer?this.privateKeyBuffer:(new TextDecoder).decode(this.privateKeyBuffer):await fetch(this.privateKeyPath).then((t=>t.text()))),this.source="url";else{const t=!!this.publicCertBuffer,i=!!this.privateKeyBuffer;e(t?"string"==typeof this.publicCertBuffer?this.publicCertBuffer:this.publicCertBuffer.toString("utf-8"):M.readFileSync(this.publicCertPath,"utf-8")),(this.privateKeyPath||this.privateKeyBuffer)&&r(i?"string"==typeof this.privateKeyBuffer?this.privateKeyBuffer:this.privateKeyBuffer.toString("utf-8"):M.readFileSync(this.privateKeyPath,"utf-8")),this.source=this.publicCertBuffer||this.privateKeyBuffer?"memory":"file"}}#l(t){try{const{pki:e}=this.forge,r="string"==typeof t?e.certificateFromPem(t):t;this.publicCert=r;const i=t=>{const e={},r={},i=t.map((t=>`${t.shortName}=${t.value}`)).join(",");for(const i of t)e[i.name]=i.value,r[i.shortName]=i.value;return{names:e,shortNames:r,raw:i}};this.metadata={subject:i(r.subject.attributes),issuer:i(r.issuer.attributes),serialNumber:r.serialNumber,validFrom:r.validity.notBefore,validTo:r.validity.notAfter}}catch(t){throw new Error("Failed to parse X.509 certificate in browser: "+t.message)}}extractCertMetadata(){return this.metadata||{}}encryptJson(t){if(!this.publicKey)throw new Error("Public key is not initialized. Call init() or generateKeyPair() first.");const e=JSON.stringify(t),r=this.publicKey.encrypt(e,this.cryptoType);return this.forge.util.encode64(r)}decryptToJson(t){if(!this.privateKey)throw new Error("Private key is required for decryption");const e=this.forge.util.decode64(t),r=this.privateKey.decrypt(e,this.cryptoType);return JSON.parse(r)}hasKeys(){return null!==this.publicKey&&null!==this.privateKey}hasCert(){return null!==this.publicCert}reset(){this.publicKey=null,this.privateKey=null,this.publicCert=null,this.metadata=null,this.source=null}}})(),window.TinyEssentials=__webpack_exports__})();
2
+ (()=>{var __webpack_modules__={20:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(7108),a=r(6737),s=r(6698),o=r(5359),h=r(4847),u=r(2951);function f(t){a.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){a.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){return new f(t)}function d(t){return new l(t)}Object.keys(u).forEach((function(t){u[t].id=i.from(u[t].id,"hex"),u[t.toLowerCase()]=u[t]})),s(f,a.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),i=o(r,t,this._hashType,this._signType,this._tag);return e?i.toString(e):i},s(l,a.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},l.prototype.verify=function(t,e,r){var n="string"==typeof e?i.from(e,r):e;this.end();var a=this._hash.digest();return h(n,a,t,this._signType,this._tag)},t.exports={Sign:c,Verify:d,createSign:c,createVerify:d}},82:(t,e,r)=>{var i=r(6698),n=r(8287).Buffer,a=r(7568),s=a.base,o=a.constants.der;function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){s.Node.call(this,"der",t)}function f(t){return t<10?"0"+t:t}t.exports=h,h.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},i(u,s.Node),u.prototype._encodeComposite=function(t,e,r,i){var a,s=function(t,e,r,i){var n;if("seqof"===t?t="seq":"setof"===t&&(t="set"),o.tagByName.hasOwnProperty(t))n=o.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);n=t}return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=o.tagClassByName[r||"universal"]<<6)}(t,e,r,this.reporter);if(i.length<128)return(a=new n(2))[0]=s,a[1]=i.length,this._createEncoderBuffer([a,i]);for(var h=1,u=i.length;u>=256;u>>=8)h++;(a=new n(2+h))[0]=s,a[1]=128|h,u=1+h;for(var f=i.length;f>0;u--,f>>=8)a[u]=255&f;return this._createEncoderBuffer([a,i])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new n(2*t.length),i=0;i<t.length;i++)r.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var i=0;i<t.length;i++)t[i]|=0}else if(Array.isArray(t))for(t=t.slice(),i=0;i<t.length;i++)t[i]|=0;if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var a=0;for(i=0;i<t.length;i++){var s=t[i];for(a++;s>=128;s>>=7)a++}var o=new n(a),h=o.length-1;for(i=t.length-1;i>=0;i--)for(s=t[i],o[h--]=127&s;(s>>=7)>0;)o[h--]=128|127&s;return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){var r,i=new Date(t);return"gentime"===e?r=[f(i.getFullYear()),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(i.getFullYear()%100),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!n.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new n(r)}if(n.isBuffer(t)){var i=t.length;0===t.length&&i++;var a=new n(i);return t.copy(a),0===t.length&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var s=t;s>=256;s>>=8)i++;for(s=(a=new Array(i)).length-1;s>=0;s--)a[s]=255&t,t>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new n(a))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var i,n=this._baseState;if(null===n.default)return!1;var a=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),a.length!==n.defaultBuffer.length)return!1;for(i=0;i<a.length;i++)if(a[i]!==n.defaultBuffer[i])return!1;return!0}},125:(t,e,r)=>{var i=r(4050),n=r(1241),a=r(530),s=r(2438),o=r(8078);function h(t,e,r){if(t=t.toLowerCase(),a[t])return n.createCipheriv(t,e,r);if(s[t])return new i({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function u(t,e,r){if(t=t.toLowerCase(),a[t])return n.createDecipheriv(t,e,r);if(s[t])return new i({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,i;if(t=t.toLowerCase(),a[t])r=a[t].key,i=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,i=s[t].iv}var n=o(e,!1,r,i);return h(t,n.key,n.iv)},e.createCipheriv=e.Cipheriv=h,e.createDecipher=e.Decipher=function(t,e){var r,i;if(t=t.toLowerCase(),a[t])r=a[t].key,i=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,i=s[t].iv}var n=o(e,!1,r,i);return u(t,n.key,n.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(n.getCiphers())}},149:(t,e,r)=>{var i=r(276);r(9504),r(1696),r(1267),r(1598),r(7619);var n=t.exports=i.ssh=i.ssh||{};function a(t,e){var r=e.toString(16);r[0]>="8"&&(r="00"+r);var n=i.util.hexToBytes(r);t.putInt32(n.length),t.putBytes(n)}function s(t,e){t.putInt32(e.length),t.putString(e)}function o(){for(var t=i.md.sha1.create(),e=arguments.length,r=0;r<e;++r)t.update(arguments[r]);return t.digest()}n.privateKeyToPutty=function(t,e,r){var n="ssh-rsa",h=""===(e=e||"")?"none":"aes256-cbc",u="PuTTY-User-Key-File-2: "+n+"\r\n";u+="Encryption: "+h+"\r\n",u+="Comment: "+(r=r||"")+"\r\n";var f=i.util.createBuffer();s(f,n),a(f,t.e),a(f,t.n);var l=i.util.encode64(f.bytes(),64),c=Math.floor(l.length/66)+1;u+="Public-Lines: "+c+"\r\n",u+=l;var d,p=i.util.createBuffer();if(a(p,t.d),a(p,t.p),a(p,t.q),a(p,t.qInv),e){var m=p.length()+16-1;m-=m%16;var g=o(p.bytes());g.truncate(g.length()-m+p.length()),p.putBuffer(g);var y=i.util.createBuffer();y.putBuffer(o("\0\0\0\0",e)),y.putBuffer(o("\0\0\0",e));var v=i.aes.createEncryptionCipher(y.truncate(8),"CBC");v.start(i.util.createBuffer().fillWithByte(0,16)),v.update(p.copy()),v.finish();var b=v.output;b.truncate(16),d=i.util.encode64(b.bytes(),64)}else d=i.util.encode64(p.bytes(),64);u+="\r\nPrivate-Lines: "+(c=Math.floor(d.length/66)+1)+"\r\n",u+=d;var w=o("putty-private-key-file-mac-key",e),M=i.util.createBuffer();s(M,n),s(M,h),s(M,r),M.putInt32(f.length()),M.putBuffer(f),M.putInt32(p.length()),M.putBuffer(p);var _=i.hmac.create();return _.start("sha1",w),_.update(M.bytes()),u+"\r\nPrivate-MAC: "+_.digest().toHex()+"\r\n"},n.publicKeyToOpenSSH=function(t,e){var r="ssh-rsa";e=e||"";var n=i.util.createBuffer();return s(n,r),a(n,t.e),a(n,t.n),r+" "+i.util.encode64(n.bytes())+" "+e},n.privateKeyToOpenSSH=function(t,e){return e?i.pki.encryptRsaPrivateKey(t,e,{legacy:!0,algorithm:"aes128"}):i.pki.privateKeyToPem(t)},n.getPublicKeyFingerprint=function(t,e){var r=(e=e||{}).md||i.md.md5.create(),n=i.util.createBuffer();s(n,"ssh-rsa"),a(n,t.e),a(n,t.n),r.start(),r.update(n.getBytes());var o=r.digest();if("hex"===e.encoding){var h=o.toHex();return e.delimiter?h.match(/.{2}/g).join(e.delimiter):h}if("binary"===e.encoding)return o.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".');return o}},172:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.sha256=i.sha256||{};i.md.sha256=i.md.algorithms.sha256=n,n.create=function(){s||(a=String.fromCharCode(128),a+=i.util.fillString(String.fromCharCode(0),64),o=[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],s=!0);var t=null,e=i.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var r=n.messageLengthSize/4,a=0;a<r;++a)n.fullMessageLength.push(0);return e=i.util.createBuffer(),t={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n}};return n.start(),n.update=function(a,s){"utf8"===s&&(a=i.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=o[1],o[1]=o[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,o[0]=o[1]/4294967296>>>0;return e.putBytes(a),h(t,r,e),(e.read>2048||0===e.length())&&e.compact(),n},n.digest=function(){var s=i.util.createBuffer();s.putBytes(e.bytes());var o,u=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize&n.blockLength-1;s.putBytes(a.substr(0,n.blockLength-u));for(var f=8*n.fullMessageLength[0],l=0;l<n.fullMessageLength.length-1;++l)f+=(o=8*n.fullMessageLength[l+1])/4294967296>>>0,s.putInt32(f>>>0),f=o>>>0;s.putInt32(f);var c={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};h(c,r,s);var d=i.util.createBuffer();return d.putInt32(c.h0),d.putInt32(c.h1),d.putInt32(c.h2),d.putInt32(c.h3),d.putInt32(c.h4),d.putInt32(c.h5),d.putInt32(c.h6),d.putInt32(c.h7),d},n};var a=null,s=!1,o=null;function h(t,e,r){for(var i,n,a,s,h,u,f,l,c,d,p,m,g,y=r.length();y>=64;){for(h=0;h<16;++h)e[h]=r.getInt32();for(;h<64;++h)i=((i=e[h-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,n=((n=e[h-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,e[h]=i+e[h-7]+n+e[h-16]|0;for(u=t.h0,f=t.h1,l=t.h2,c=t.h3,d=t.h4,p=t.h5,m=t.h6,g=t.h7,h=0;h<64;++h)a=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),s=u&f|l&(u^f),i=g+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(m^d&(p^m))+o[h]+e[h],g=m,m=p,p=d,d=c+i>>>0,c=l,l=f,f=u,u=i+(n=a+s)>>>0;t.h0=t.h0+u|0,t.h1=t.h1+f|0,t.h2=t.h2+l|0,t.h3=t.h3+c|0,t.h4=t.h4+d|0,t.h5=t.h5+p|0,t.h6=t.h6+m|0,t.h7=t.h7+g|0,y-=64}}},206:(t,e,r)=>{"use strict";var i=r(5606),n=r(3225);t.exports=b;var a,s=r(2240);b.ReadableState=v,r(7007).EventEmitter;var o=function(t,e){return t.listeners(e).length},h=r(5567),u=r(4116).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=Object.create(r(5622));l.inherits=r(6698);var c=r(2668),d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,m=r(672),g=r(6278);l.inherits(b,h);var y=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var i=e instanceof(a=a||r(6248));this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(6427).I),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(a=a||r(6248),!(this instanceof b))return new b(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),h.call(this)}function w(t,e,r,i,n){var a,s=t._readableState;return null===e?(s.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,E(t)}}(t,s)):(n||(a=function(t,e){var r,i;return i=e,u.isBuffer(i)||i instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),i?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):M(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?M(t,s,e,!1):A(t,s)):M(t,s,e,!1))):i||(s.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function M(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),A(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=u.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},b.prototype.unshift=function(t){return w(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return p||(p=r(6427).I),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var _=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=_?t=_:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(C,t):C(t))}function C(t){d("emit readable"),t.emit("readable"),k(t)}function A(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(T,t,e))}function T(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function B(t){d("readable nexttick read 0"),t.read(0)}function I(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),k(t),e.flowing&&!e.reading&&t.read(0)}function k(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,s=t>a.length?a.length:t;if(s===a.length?n+=a:n+=a.slice(0,t),0==(t-=s)){s===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(s));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=u.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,s=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,s),0==(t-=s)){s===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(s));break}++n}return e.length-=n,r}(t,e),i}(t,e.buffer,e.decoder),r);var r}function N(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function x(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}b.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):E(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&N(this),null;var i,n=e.needReadable;return d("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",n=!0),e.ended||e.reading?d("reading or ended",n=!1):n&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(r,e))),null===(i=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==i&&this.emit("data",i),i},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,e);var h=e&&!1===e.end||t===i.stdout||t===i.stderr?v:u;function u(){d("onend"),t.end()}a.endEmitted?n.nextTick(h):r.once("end",h),t.on("unpipe",(function e(i,n){d("onunpipe"),i===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",f),t.removeListener("error",m),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",p),l=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}));var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,k(t))}}(r);t.on("drain",f);var l=!1,c=!1;function p(e){d("ondata"),c=!1,!1!==t.write(e)||c||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==x(a.pipes,t))&&!l&&(d("false write response, pause",a.awaitDrain),a.awaitDrain++,c=!0),r.pause())}function m(e){d("onerror",e),v(),t.removeListener("error",m),0===o(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),v()}function y(){d("onfinish"),t.removeListener("close",g),v()}function v(){d("unpipe"),r.unpipe(t)}return r.on("data",p),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",m),t.once("close",g),t.once("finish",y),t.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=x(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},b.prototype.on=function(t,e){var r=h.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):n.nextTick(B,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(I,t,e))}(this,t)),this},b.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){d("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var a=0;a<y.length;a++)t.on(y[a],this.emit.bind(this,y[a]));return this._read=function(e){d("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=R},220:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011),a=n.assert,s=n.cachedProperty,o=n.parseBytes;function h(t,e){this.eddsa=t,"object"!=typeof e&&(e=o(e)),Array.isArray(e)&&(a(e.length===2*t.encodingLength,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),a(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof i&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(h,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(h,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(h,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(h,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),h.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},h.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},t.exports=h},251:(t,e)=>{e.read=function(t,e,r,i,n){var a,s,o=8*n-i-1,h=(1<<o)-1,u=h>>1,f=-7,l=r?n-1:0,c=r?-1:1,d=t[e+l];for(l+=c,a=d&(1<<-f)-1,d>>=-f,f+=o;f>0;a=256*a+t[e+l],l+=c,f-=8);for(s=a&(1<<-f)-1,a>>=-f,f+=i;f>0;s=256*s+t[e+l],l+=c,f-=8);if(0===a)a=1-u;else{if(a===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),a-=u}return(d?-1:1)*s*Math.pow(2,a-i)},e.write=function(t,e,r,i,n,a){var s,o,h,u=8*a-n-1,f=(1<<u)-1,l=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:a-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+l>=1?c/h:c*Math.pow(2,1-l))*h>=2&&(s++,h/=2),s+l>=f?(o=0,s=f):s+l>=1?(o=(e*h-1)*Math.pow(2,n),s+=l):(o=e*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;t[r+d]=255&o,d+=p,o/=256,n-=8);for(s=s<<n|o,u+=n;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*m}},268:(t,e,r)=>{var i=r(276);r(7619),r(3736),r(9356),function(){if(i.prime)t.exports=i.prime;else{var e=t.exports=i.prime=i.prime||{},r=i.jsbn.BigInteger,n=[6,4,2,4,2,4,6,2],a=new r(null);a.fromInt(30);var s=function(t,e){return t|e};e.generateProbablePrime=function(t,e,n){"function"==typeof e&&(n=e,e={});var a=(e=e||{}).algorithm||"PRIMEINC";"string"==typeof a&&(a={name:a}),a.options=a.options||{};var s=e.prng||i.random,h={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r<t.length;++r)t[r]=e.charCodeAt(r)}};if("PRIMEINC"===a.name)return function(t,e,n,a){return"workers"in n?function(t,e,n,a){if("undefined"==typeof Worker)return o(t,e,n,a);var s=u(t,e),h=n.workers,f=n.workLoad||100,l=30*f/8,c=n.workerScript||"forge/prime.worker.js";if(-1===h)return i.util.estimateCores((function(t,e){t&&(e=2),h=e-1,d()}));function d(){h=Math.max(1,h);for(var i=[],n=0;n<h;++n)i[n]=new Worker(c);for(n=0;n<h;++n)i[n].addEventListener("message",d);var o=!1;function d(n){if(!o){var h=n.data;if(h.found){for(var c=0;c<i.length;++c)i[c].terminate();return o=!0,a(null,new r(h.prime,16))}s.bitLength()>t&&(s=u(t,e));var d=s.toString(16);n.target.postMessage({hex:d,workLoad:f}),s.dAddOffset(l,0)}}}d()}(t,e,n,a):o(t,e,n,a)}(t,h,a.options,n);throw new Error("Invalid prime generation algorithm: "+a.name)}}function o(t,e,r,i){var n=u(t,e),a=function(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}(n.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),h(n,t,e,0,a,s,i)}function h(t,e,r,a,s,o,f){var l=+new Date;do{if(t.bitLength()>e&&(t=u(e,r)),t.isProbablePrime(s))return f(null,t);t.dAddOffset(n[a++%8],0)}while(o<0||+new Date-l<o);i.util.setImmediate((function(){h(t,e,r,a,s,o,f)}))}function u(t,e){var i=new r(t,e),n=t-1;return i.testBit(n)||i.bitwiseTo(r.ONE.shiftLeft(n),s,i),i.dAddOffset(31-i.mod(a).byteValue(),0),i}}()},276:t=>{t.exports={options:{usePureJavaScript:!1}}},295:(t,e,r)=>{var i=r(8287).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),n=new i(r),a=0;a<r;++a)n[a]=t[a]^e[a];return n}},310:()=>{},320:(t,e,r)=>{var i=r(8276);t.exports=function(t){return(new i).update(t).digest()}},345:(t,e,r)=>{t.exports=r(7007).EventEmitter},370:(t,e,r)=>{"use strict";var i=r(8490),n=r(6698),a=r(6677),s=r(7011);function o(t){a.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.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 h(t,e,r){a.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,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)))}n(o,a),t.exports=o,o.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},n(h,a.BasePoint),o.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},o.prototype.point=function(t,e){return new h(this,t,e)},o.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},h.fromJSON=function(t,e){return new h(t,e[0],e[1]||t.one)},h.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},h.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(r),s=n.redMul(i),o=e.z.redMul(a.redAdd(s).redSqr()),h=e.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,h)},h.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},392:(t,e,r)=>{var i=r(2861).Buffer;function n(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}n.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=i.from(t,e));for(var r=this._block,n=this._blockSize,a=t.length,s=this._len,o=0;o<a;){for(var h=s%n,u=Math.min(a-o,n-h),f=0;f<u;f++)r[h+f]=t[o+f];o+=u,(s+=u)%n==0&&this._update(r)}return this._len+=a,this},n.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=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 i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},462:(t,e,r)=>{var i=r(2861).Buffer;function n(t){i.isBuffer(t)||(t=i.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(4*n);return r}function a(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,i,n){for(var a,s,o,h,u=r[0],f=r[1],l=r[2],c=r[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],y=4,v=1;v<n;v++)a=u[d>>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&g]^e[y++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^c[255&d]^e[y++],o=u[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^c[255&p]^e[y++],h=u[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[y++],d=a,p=s,m=o,g=h;return a=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[y++],s=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[y++],o=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[y++],h=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[y++],[a>>>=0,s>>>=0,o>>>=0,h>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,h=0;h<256;++h){var u=o^o<<1^o<<2^o<<3^o<<4;u=u>>>8^255&u^99,r[s]=u,i[u]=s;var f=t[s],l=t[f],c=t[l],d=257*t[u]^16843008*u;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,a[0][u]=d<<24|d>>>8,a[1][u]=d<<16|d>>>16,a[2][u]=d<<8|d>>>24,a[3][u]=d,0===s?s=o=1:(s=f^t[t[t[c^f]]],o^=t[t[o]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}}();function u(t){this._key=n(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],a=0;a<e;a++)n[a]=t[a];for(a=e;a<i;a++){var s=n[a-1];a%e==0?(s=s<<8|s>>>24,s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s],s^=o[a/e|0]<<24):e>6&&a%e==4&&(s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s]),n[a]=n[a-e]^s}for(var u=[],f=0;f<i;f++){var l=i-f,c=n[l-(f%4?0:4)];u[f]=f<4||l<=4?c:h.INV_SUB_MIX[0][h.SBOX[c>>>24]]^h.INV_SUB_MIX[1][h.SBOX[c>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[c>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&c]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return s(t=n(t),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=i.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},u.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),a=i.allocUnsafe(16);return a.writeUInt32BE(r[0],0),a.writeUInt32BE(r[3],4),a.writeUInt32BE(r[2],8),a.writeUInt32BE(r[1],12),a},u.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=u},480:(t,e,r)=>{"use strict";var i,n=e,a=r(7952),s=r(894),o=r(7011).assert;function h(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new h(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=h,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r(4011)}catch(t){i=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},530:(t,e,r)=>{var i={ECB:r(2632),CBC:r(2884),CFB:r(6383),CFB8:r(6975),CFB1:r(5264),OFB:r(6843),CTR:r(3053),GCM:r(3053)},n=r(3219);for(var a in n)n[a].module=i[n[a].mode];t.exports=n},650:(t,e,r)=>{var i=r(462),n=r(2861).Buffer,a=r(6168);function s(t,e,r,s){a.call(this),this._cipher=new i.AES(e),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._mode=t}r(6698)(s,a),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},672:(t,e,r)=>{"use strict";var i=r(4116).Buffer,n=r(1638);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);for(var e,r,n=i.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=n,r=s,a.data.copy(e,r),s+=a.data.length,a=a.next;return n},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},735:(t,e,r)=>{var i=r(6698),n=r(82);function a(t){n.call(this,t),this.enc="pem"}i(a,n),t.exports=a,a.prototype.encode=function(t,e){for(var r=n.prototype.encode.call(this,t).toString("base64"),i=["-----BEGIN "+e.label+"-----"],a=0;a<r.length;a+=64)i.push(r.slice(a,a+64));return i.push("-----END "+e.label+"-----"),i.join("\n")}},894:(t,e,r)=>{"use strict";var i=e;i.base=r(6677),i.short=r(9188),i.mont=r(370),i.edwards=r(1298)},993:(t,e,r)=>{var i=r(9673).Reporter,n=r(9673).EncoderBuffer,a=r(9673).DecoderBuffer,s=r(3349),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function u(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};f.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},u.prototype._wrap=function(){var t=this._baseState;h.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},u.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var i=t[r];e[i]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),o.forEach((function(t){u.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),u.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},u.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var i,n=r.default,s=!0,o=null;if(null!==r.key&&(o=t.enterKey(r.key)),r.optional){var h=null;if(null!==r.explicit?h=r.explicit:null!==r.implicit?h=r.implicit:null!==r.tag&&(h=r.tag),null!==h||r.any){if(s=this._peekTag(t,h,r.any),t.isError(s))return s}else{var u=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(u)}}if(r.obj&&s&&(i=t.enterObject()),s){if(null!==r.explicit){var f=this._decodeTag(t,r.explicit);if(t.isError(f))return f;t=f}var l=t.offset;if(null===r.use&&null===r.choice){r.any&&(u=t.save());var c=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(c))return c;r.any?n=t.raw(u):t=c}if(e&&e.track&&null!==r.tag&&e.track(t.path(),l,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(n=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new a(n);n=this._getUse(r.contains,t._reporterState.obj)._decode(d,e)}}return r.obj&&s&&(n=t.leaveObject(i)),null===r.key||null===n&&!0!==s?null!==o&&t.exitKey(o):t.leaveKey(o,r.key,n),n},u.prototype._decodeGeneric=function(t,e,r){var i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,i.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&i.args?this._decodeObjid(e,i.args[0],i.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(t,e){var r=this._baseState,i=null,n=!1;return Object.keys(r.choice).some((function(a){var s=t.save(),o=r.choice[a];try{var h=o._decode(t,e);if(t.isError(h))return!1;i={type:a,value:h},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?i:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new n(t,this.reporter)},u.prototype._encode=function(t,e,r){var i=this._baseState;if(null===i.default||i.default!==t){var n=this._encodeValue(t,e,r);if(void 0!==n&&!this._skipDefault(n,e,r))return n}},u.prototype._encodeValue=function(t,e,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(t,e||new i);var a=null;if(this.reporter=e,n.optional&&void 0===t){if(null===n.default)return;t=n.default}var s=null,o=!1;if(n.any)a=this._createEncoderBuffer(t);else if(n.choice)a=this._encodeChoice(t,e);else if(n.contains)s=this._getUse(n.contains,r)._encode(t,e),o=!0;else if(n.children)s=n.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var i=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var n=r._encode(t[r._baseState.key],e,t);return e.leaveKey(i),n}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return e.error("Too many args for : "+n.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var h=this.clone();h._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){var i=this._baseState;return this._getUse(i.args[0],t)._encode(r,e)}),h))}else null!==n.use?a=this._getUse(n.use,r)._encode(t,e):(s=this._encodePrimitive(n.tag,t),o=!0);if(!n.any&&null===n.choice){var u=null!==n.implicit?n.implicit:n.tag,f=null===n.implicit?"universal":"context";null===u?null===n.use&&e.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(u,o,f,s))}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a},u.prototype._encodeChoice=function(t,e){var r=this._baseState,i=r.choice[t.type];return i||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},1069:()=>{},1137:(t,e,r)=>{"use strict";var i=r(7568);e.certificate=r(6413);var n=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=n;var a=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=a;var s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),o=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));e.PublicKey=o;var h=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=h;var u=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=u;var f=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=f,e.DSAparam=i.define("DSAparam",(function(){this.int()}));var l=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),c=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=c,e.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1158:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(4688).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,P=x>>>13,D=0|s[9],O=8191&D,j=D>>>13,K=0|o[0],q=8191&K,V=K>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(P,q)|0,a=Math.imul(P,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(j,q)|0,a=Math.imul(j,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(P,z)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(j,z)|0,a=Math.imul(j,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(j,Z)|0,a=Math.imul(j,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(j,Y)|0,a=Math.imul(j,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(j,rt)|0,a=Math.imul(j,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(j,at)|0,a=Math.imul(j,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(P,ht)|0,a=a+Math.imul(P,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(j,ht)|0,a=Math.imul(j,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(j,pt)|0))<<13)|0;return u=((a=Math.imul(j,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},1200:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011).assert;function a(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=a,a.fromPublic=function(t,e,r){return e instanceof a?e:new a(t,{pub:e,pubEnc:r})},a.fromPrivate=function(t,e,r){return e instanceof a?e:new a(t,{priv:e,privEnc:r})},a.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new i(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?n(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},a.prototype.derive=function(t){return t.validate()||n(t.validate(),"public point not validated"),t.mul(this.priv).getX()},a.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},a.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},1241:(t,e,r)=>{var i=r(5799),n=r(6171),a=r(3219);e.createCipher=e.Cipher=i.createCipher,e.createCipheriv=e.Cipheriv=i.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(a)}},1267:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.md5=i.md5||{};i.md.md5=i.md.algorithms.md5=n,n.create=function(){u||function(){a=String.fromCharCode(128),a+=i.util.fillString(String.fromCharCode(0),64),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],o=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],h=new Array(64);for(var t=0;t<64;++t)h[t]=Math.floor(4294967296*Math.abs(Math.sin(t+1)));u=!0}();var t=null,e=i.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var r=n.messageLengthSize/4,a=0;a<r;++a)n.fullMessageLength.push(0);return e=i.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n}};return n.start(),n.update=function(a,s){"utf8"===s&&(a=i.util.encodeUtf8(a));var o=a.length;n.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var h=n.fullMessageLength.length-1;h>=0;--h)n.fullMessageLength[h]+=o[1],o[1]=o[0]+(n.fullMessageLength[h]/4294967296>>>0),n.fullMessageLength[h]=n.fullMessageLength[h]>>>0,o[0]=o[1]/4294967296>>>0;return e.putBytes(a),f(t,r,e),(e.read>2048||0===e.length())&&e.compact(),n},n.digest=function(){var s=i.util.createBuffer();s.putBytes(e.bytes());var o=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize&n.blockLength-1;s.putBytes(a.substr(0,n.blockLength-o));for(var h,u=0,l=n.fullMessageLength.length-1;l>=0;--l)u=(h=8*n.fullMessageLength[l]+u)/4294967296>>>0,s.putInt32Le(h>>>0);var c={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};f(c,r,s);var d=i.util.createBuffer();return d.putInt32Le(c.h0),d.putInt32Le(c.h1),d.putInt32Le(c.h2),d.putInt32Le(c.h3),d},n};var a=null,s=null,o=null,h=null,u=!1;function f(t,e,r){for(var i,n,a,u,f,l,c,d=r.length();d>=64;){for(n=t.h0,a=t.h1,u=t.h2,f=t.h3,c=0;c<16;++c)e[c]=r.getInt32Le(),i=n+(f^a&(u^f))+h[c]+e[c],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;for(;c<32;++c)i=n+(u^f&(a^u))+h[c]+e[s[c]],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;for(;c<48;++c)i=n+(a^u^f)+h[c]+e[s[c]],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;for(;c<64;++c)i=n+(u^(a|~f))+h[c]+e[s[c]],n=f,f=u,u=a,a+=i<<(l=o[c])|i>>>32-l;t.h0=t.h0+n|0,t.h1=t.h1+a|0,t.h2=t.h2+u|0,t.h3=t.h3+f|0,d-=64}}},1298:(t,e,r)=>{"use strict";var i=r(7011),n=r(8490),a=r(6698),s=r(6677),o=i.assert;function h(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new n(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function u(t,e,r,i,a){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===i?(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 n(e,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=a&&new n(a,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()))))}a(h,s),t.exports=h,h.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},h.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},h.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},h.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=i.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var h=o.fromRed().isOdd();return(e&&!h||!e&&h)&&(o=o.redNeg()),this.point(t,o)},h.prototype.pointFromY=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==e&&(o=o.redNeg()),this.point(o,t)},h.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===i.cmp(n)},a(u,s.BasePoint),h.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},h.prototype.point=function(t,e,r,i){return new u(this,t,e,r,i)},u.fromJSON=function(t,e){return new u(t,e[0],e[1],e[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=i.redAdd(e),s=a.redSub(r),o=i.redSub(e),h=n.redMul(s),u=a.redMul(o),f=n.redMul(o),l=s.redMul(a);return this.curve.point(h,u,l,f)},u.prototype._projDbl=function(){var t,e,r,i,n,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),h=this.y.redSqr();if(this.curve.twisted){var u=(i=this.curve._mulA(o)).redAdd(h);this.zOne?(t=s.redSub(o).redSub(h).redMul(u.redSub(this.curve.two)),e=u.redMul(i.redSub(h)),r=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),a=u.redSub(n).redISub(n),t=s.redSub(o).redISub(h).redMul(a),e=u.redMul(i.redSub(h)),r=u.redMul(a))}else i=o.redAdd(h),n=this.curve._mulC(this.z).redSqr(),a=i.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(i)).redMul(a),e=this.curve._mulC(i).redMul(o.redISub(h)),r=i.redMul(a);return this.curve.point(t,e,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),a=r.redSub(e),s=n.redSub(i),o=n.redAdd(i),h=r.redAdd(e),u=a.redMul(s),f=o.redMul(h),l=a.redMul(h),c=s.redMul(o);return this.curve.point(u,f,c,l)},u.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),a=this.x.redMul(t.x),s=this.y.redMul(t.y),o=this.curve.d.redMul(a).redMul(s),h=n.redSub(o),u=n.redAdd(o),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(s),l=i.redMul(h).redMul(f);return this.curve.twisted?(e=i.redMul(u).redMul(s.redSub(this.curve._mulA(a))),r=h.redMul(u)):(e=i.redMul(u).redMul(s.redSub(a)),r=this.curve._mulC(h).redMul(u)),this.curve.point(l,e,r)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},u.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},1324:(t,e,r)=>{var i=r(8287).Buffer,n=r(6729),a=r(2801);t.exports=function(t){return new o(t)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function h(t,e,r){Array.isArray(t)||(t=t.toArray());var n=new i(t);if(r&&n.length<r){var a=new i(r-n.length);a.fill(0),n=i.concat([a,n])}return e?n.toString(e):n}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,o.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},o.prototype.computeSecret=function(t,e,r){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),h(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},o.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),h(r,t)},o.prototype.getPrivateKey=function(t){return h(this.keys.getPrivate(),t)},o.prototype.setPublicKey=function(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this.keys._importPublic(t),this},o.prototype.setPrivateKey=function(t,e){e=e||"utf8",i.isBuffer(t)||(t=new i(t,e));var r=new a(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},1352:(t,e,r)=>{var i=r(320),n=r(6011),a=r(2802),s=r(2861).Buffer,o=r(4196),h=r(2455),u=r(3382),f=s.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(t,e,r){var o=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new n).update(t).digest()}:"md5"===t?i:function(e){return a(t).update(e).digest()}}(t),h="sha512"===t||"sha384"===t?128:64;e.length>h?e=o(e):e.length<h&&(e=s.concat([e,f],h));for(var u=s.allocUnsafe(h+l[t]),c=s.allocUnsafe(h+l[t]),d=0;d<h;d++)u[d]=54^e[d],c[d]=92^e[d];var p=s.allocUnsafe(h+r+4);u.copy(p,0,0,h),this.ipad1=p,this.ipad2=u,this.opad=c,this.alg=t,this.blocksize=h,this.hash=o,this.size=l[t]}c.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,i,n){o(r,i);var a=new c(n=n||"sha1",t=u(t,h,"Password"),(e=u(e,h,"Salt")).length),f=s.allocUnsafe(i),d=s.allocUnsafe(e.length+4);e.copy(d,0,0,e.length);for(var p=0,m=l[n],g=Math.ceil(i/m),y=1;y<=g;y++){d.writeUInt32BE(y,e.length);for(var v=a.run(d,a.ipad1),b=v,w=1;w<r;w++){b=a.run(b,a.ipad2);for(var M=0;M<m;M++)v[M]^=b[M]}v.copy(f,p),p+=m}return f}},1355:(t,e,r)=>{t.exports=r(8106),r(1267),r(1598),r(172),r(2313)},1373:(t,e,r)=>{var i=r(276);r(5250),t.exports=i.mgf=i.mgf||{},i.mgf.mgf1=i.mgf1},1417:(t,e,r)=>{var i=r(276);r(9356),r(7619),(t.exports=i.pss=i.pss||{}).create=function(t){3===arguments.length&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e,r=t.md,n=t.mgf,a=r.digestLength,s=t.salt||null;if("string"==typeof s&&(s=i.util.createBuffer(s)),"saltLength"in t)e=t.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");e=s.length()}if(null!==s&&s.length()!==e)throw new Error("Given salt length does not match length of given salt.");var o=t.prng||i.random;return{encode:function(t,h){var u,f,l=h-1,c=Math.ceil(l/8),d=t.digest().getBytes();if(c<a+e+2)throw new Error("Message is too long to encrypt.");f=null===s?o.getBytesSync(e):s.bytes();var p=new i.util.ByteBuffer;p.fillWithByte(0,8),p.putBytes(d),p.putBytes(f),r.start(),r.update(p.getBytes());var m=r.digest().getBytes(),g=new i.util.ByteBuffer;g.fillWithByte(0,c-e-a-2),g.putByte(1),g.putBytes(f);var y=g.getBytes(),v=c-a-1,b=n.generate(m,v),w="";for(u=0;u<v;u++)w+=String.fromCharCode(y.charCodeAt(u)^b.charCodeAt(u));var M=65280>>8*c-l&255;return(w=String.fromCharCode(w.charCodeAt(0)&~M)+w.substr(1))+m+String.fromCharCode(188)},verify:function(t,s,o){var h,u=o-1,f=Math.ceil(u/8);if(s=s.substr(-f),f<a+e+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==s.charCodeAt(f-1))throw new Error("Encoded message does not end in 0xBC.");var l=f-a-1,c=s.substr(0,l),d=s.substr(l,a),p=65280>>8*f-u&255;if(c.charCodeAt(0)&p)throw new Error("Bits beyond keysize not zero as expected.");var m=n.generate(d,l),g="";for(h=0;h<l;h++)g+=String.fromCharCode(c.charCodeAt(h)^m.charCodeAt(h));g=String.fromCharCode(g.charCodeAt(0)&~p)+g.substr(1);var y=f-a-e-2;for(h=0;h<y;h++)if(0!==g.charCodeAt(h))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(y))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var v=g.substr(-e),b=new i.util.ByteBuffer;return b.fillWithByte(0,8),b.putBytes(t),b.putBytes(v),r.start(),r.update(b.getBytes()),d===r.digest().getBytes()}}}},1565:(t,e,r)=>{"use strict";e.po=r(3209),r(7108),r(3507);var i=r(5715),n=Object.keys(i),a=(["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n),r(8396));a.pbkdf2,a.pbkdf2Sync;var s=r(125);s.Cipher,s.createCipher,s.Cipheriv,e.Tt=s.createCipheriv,s.Decipher,s.createDecipher,s.Decipheriv,e._7=s.createDecipheriv,s.getCiphers,s.listCiphers;var o=r(5380);o.DiffieHellmanGroup,o.createDiffieHellmanGroup,o.getDiffieHellman,o.createDiffieHellman,o.DiffieHellman;var h=r(20);h.createSign,h.Sign,h.createVerify,h.Verify,r(1324);var u=r(7168);u.publicEncrypt,u.privateEncrypt,u.publicDecrypt,u.privateDecrypt;var f=r(6983);f.randomFill,f.randomFillSync},1598:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.sha1=i.sha1||{};i.md.sha1=i.md.algorithms.sha1=n,n.create=function(){s||(a=String.fromCharCode(128),a+=i.util.fillString(String.fromCharCode(0),64),s=!0);var t=null,e=i.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var r=n.messageLengthSize/4,a=0;a<r;++a)n.fullMessageLength.push(0);return e=i.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n}};return n.start(),n.update=function(a,s){"utf8"===s&&(a=i.util.encodeUtf8(a));var h=a.length;n.messageLength+=h,h=[h/4294967296>>>0,h>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=h[1],h[1]=h[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,h[0]=h[1]/4294967296>>>0;return e.putBytes(a),o(t,r,e),(e.read>2048||0===e.length())&&e.compact(),n},n.digest=function(){var s=i.util.createBuffer();s.putBytes(e.bytes());var h,u=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize&n.blockLength-1;s.putBytes(a.substr(0,n.blockLength-u));for(var f=8*n.fullMessageLength[0],l=0;l<n.fullMessageLength.length-1;++l)f+=(h=8*n.fullMessageLength[l+1])/4294967296>>>0,s.putInt32(f>>>0),f=h>>>0;s.putInt32(f);var c={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};o(c,r,s);var d=i.util.createBuffer();return d.putInt32(c.h0),d.putInt32(c.h1),d.putInt32(c.h2),d.putInt32(c.h3),d.putInt32(c.h4),d},n};var a=null,s=!1;function o(t,e,r){for(var i,n,a,s,o,h,u,f=r.length();f>=64;){for(n=t.h0,a=t.h1,s=t.h2,o=t.h3,h=t.h4,u=0;u<16;++u)i=r.getInt32(),e[u]=i,i=(n<<5|n>>>27)+(o^a&(s^o))+h+1518500249+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<20;++u)i=(i=e[u-3]^e[u-8]^e[u-14]^e[u-16])<<1|i>>>31,e[u]=i,i=(n<<5|n>>>27)+(o^a&(s^o))+h+1518500249+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<32;++u)i=(i=e[u-3]^e[u-8]^e[u-14]^e[u-16])<<1|i>>>31,e[u]=i,i=(n<<5|n>>>27)+(a^s^o)+h+1859775393+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<40;++u)i=(i=e[u-6]^e[u-16]^e[u-28]^e[u-32])<<2|i>>>30,e[u]=i,i=(n<<5|n>>>27)+(a^s^o)+h+1859775393+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<60;++u)i=(i=e[u-6]^e[u-16]^e[u-28]^e[u-32])<<2|i>>>30,e[u]=i,i=(n<<5|n>>>27)+(a&s|o&(a^s))+h+2400959708+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;for(;u<80;++u)i=(i=e[u-6]^e[u-16]^e[u-28]^e[u-32])<<2|i>>>30,e[u]=i,i=(n<<5|n>>>27)+(a^s^o)+h+3395469782+i,h=o,o=s,s=(a<<30|a>>>2)>>>0,a=n,n=i;t.h0=t.h0+n|0,t.h1=t.h1+a|0,t.h2=t.h2+s|0,t.h3=t.h3+o|0,t.h4=t.h4+h|0,f-=64}}},1636:t=>{"use strict";t.exports={rE:"6.6.1"}},1638:()=>{},1696:(t,e,r)=>{var i=r(276);r(8106),r(7619),(t.exports=i.hmac=i.hmac||{}).create=function(){var t=null,e=null,r=null,n=null,a={start:function(a,s){if(null!==a)if("string"==typeof a){if(!((a=a.toLowerCase())in i.md.algorithms))throw new Error('Unknown hash algorithm "'+a+'"');e=i.md.algorithms[a].create()}else e=a;if(null===s)s=t;else{if("string"==typeof s)s=i.util.createBuffer(s);else if(i.util.isArray(s)){var o=s;s=i.util.createBuffer();for(var h=0;h<o.length;++h)s.putByte(o[h])}var u=s.length();for(u>e.blockLength&&(e.start(),e.update(s.bytes()),s=e.digest()),r=i.util.createBuffer(),n=i.util.createBuffer(),u=s.length(),h=0;h<u;++h)o=s.at(h),r.putByte(54^o),n.putByte(92^o);if(u<e.blockLength)for(o=e.blockLength-u,h=0;h<o;++h)r.putByte(54),n.putByte(92);t=s,r=r.bytes(),n=n.bytes()}e.start(),e.update(r)},update:function(t){e.update(t)},getMac:function(){var t=e.digest().bytes();return e.start(),e.update(n),e.update(t),e.digest()}};return a.digest=a.getMac,a}},1800:(t,e,r)=>{"use strict";var i=r(6698),n=r(2861).Buffer,a=r(6168),s=n.alloc(128),o=64;function h(t,e){a.call(this,"digest"),"string"==typeof e&&(e=n.from(e)),this._alg=t,this._key=e,e.length>o?e=t(e):e.length<o&&(e=n.concat([e,s],o));for(var r=this._ipad=n.allocUnsafe(o),i=this._opad=n.allocUnsafe(o),h=0;h<o;h++)r[h]=54^e[h],i[h]=92^e[h];this._hash=[r]}i(h,a),h.prototype._update=function(t){this._hash.push(t)},h.prototype._final=function(){var t=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,t]))},t.exports=h},1816:(t,e,r)=>{"use strict";t.exports=s;var i=r(6248),n=Object.create(r(5622));function a(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);i.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",o)}function o(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){h(t,e,r)})):h(this,null,null)}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}n.inherits=r(6698),n.inherits(s,i),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,i.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;i.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},1911:(t,e,r)=>{"use strict";var i=r(7426),n=r(7766);function a(){if(!(this instanceof a))return new a;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(a,n),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},2010:(t,e,r)=>{var i=r(6698),n=r(7568),a=n.base,s=n.bignum,o=n.constants.der;function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){a.Node.call(this,"der",t)}function f(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=o.tagClass[r>>6],n=!(32&r);if(31&~r)r&=31;else{var a=r;for(r=0;!(128&~a);){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=127&a}}return{cls:i,primitive:n,tag:r,tagStr:o.tag[r]}}function l(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(!(128&i))return i;var n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var s=t.readUInt8(r);if(t.isError(s))return s;i|=s}return i}t.exports=h,h.prototype.decode=function(t,e){return t instanceof a.DecoderBuffer||(t=new a.DecoderBuffer(t,e)),this.tree._decode(t,e)},i(u,a.Node),u.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var i=t.save(),n=f(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(i),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||r)},u.prototype._decodeTag=function(t,e,r){var i=f(t,'Failed to decode tag of "'+e+'"');if(t.isError(i))return i;var n=l(t,i.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!r&&i.tag!==e&&i.tagStr!==e&&i.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(i.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');var a=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(n=t.offset-a.offset,t.restore(a),t.skip(n,'Failed to match body of: "'+e+'"'))},u.prototype._skipUntilEnd=function(t,e){for(;;){var r=f(t,e);if(t.isError(r))return r;var i,n=l(t,r.primitive,e);if(t.isError(n))return n;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===r.tagStr)break}},u.prototype._decodeList=function(t,e,r,i){for(var n=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var s=r.decode(t,"der",i);if(t.isError(s)&&a)break;n.push(s)}return n},u.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var i=t.raw();if(i.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var n="",a=0;a<i.length/2;a++)n+=String.fromCharCode(i.readUInt16BE(2*a));return n}if("numstr"===e){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var o=t.raw().toString("ascii");return this._isPrintstr(o)?o:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},u.prototype._decodeObjid=function(t,e,r){for(var i,n=[],a=0;!t.isEmpty();){var s=t.readUInt8();a<<=7,a|=127&s,128&s||(n.push(a),a=0)}128&s&&n.push(a);var o=n[0]/40|0,h=n[0]%40;if(i=r?n:[o,h].concat(n.slice(1)),e){var u=e[i.join(" ")];void 0===u&&(u=e[i.join(".")]),void 0!==u&&(i=u)}return i},u.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var i=0|r.slice(0,4),n=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),o=0|r.slice(10,12),h=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");i=0|r.slice(0,2),n=0|r.slice(2,4),a=0|r.slice(4,6),s=0|r.slice(6,8),o=0|r.slice(8,10),h=0|r.slice(10,12),i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,a,s,o,h,0)},u.prototype._decodeNull=function(t){return null},u.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},u.prototype._decodeInt=function(t,e){var r=t.raw(),i=new s(r);return e&&(i=e[i.toString(10)]||i),i},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},2045:(t,e,r)=>{var i=r(276);r(7619),t.exports=i.log=i.log||{},i.log.levels=["none","error","warning","info","debug","verbose","max"];var n={},a=[],s=null;i.log.LEVEL_LOCKED=2,i.log.NO_LEVEL_CHECK=4,i.log.INTERPOLATE=8;for(var o=0;o<i.log.levels.length;++o){var h=i.log.levels[o];n[h]={index:o,name:h.toUpperCase()}}i.log.logMessage=function(t){for(var e=n[t.level].index,r=0;r<a.length;++r){var s=a[r];s.flags&i.log.NO_LEVEL_CHECK?s.f(t):e<=n[s.level].index&&s.f(s,t)}},i.log.prepareStandard=function(t){"standard"in t||(t.standard=n[t.level].name+" ["+t.category+"] "+t.message)},i.log.prepareFull=function(t){if(!("full"in t)){var e=[t.message];e=e.concat([]||0),t.full=i.util.format.apply(this,e)}},i.log.prepareStandardFull=function(t){"standardFull"in t||(i.log.prepareStandard(t),t.standardFull=t.standard)};var u=["error","warning","info","debug","verbose"];for(o=0;o<u.length;++o)!function(t){i.log[t]=function(e,r){var n=Array.prototype.slice.call(arguments).slice(2),a={timestamp:new Date,level:t,category:e,message:r,arguments:n};i.log.logMessage(a)}}(u[o]);if(i.log.makeLogger=function(t){var e={flags:0,f:t};return i.log.setLevel(e,"none"),e},i.log.setLevel=function(t,e){var r=!1;if(t&&!(t.flags&i.log.LEVEL_LOCKED))for(var n=0;n<i.log.levels.length;++n)if(e==i.log.levels[n]){t.level=e,r=!0;break}return r},i.log.lock=function(t,e){void 0===e||e?t.flags|=i.log.LEVEL_LOCKED:t.flags&=~i.log.LEVEL_LOCKED},i.log.addLogger=function(t){a.push(t)},"undefined"!=typeof console&&"log"in console){var f;if(console.error&&console.warn&&console.info&&console.debug){var l={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},c=function(t,e){i.log.prepareStandard(e);var r=l[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),r.apply(console,n)};f=i.log.makeLogger(c)}else c=function(t,e){i.log.prepareStandardFull(e),console.log(e.standardFull)},f=i.log.makeLogger(c);i.log.setLevel(f,"debug"),i.log.addLogger(f),s=f}else console={log:function(){}};if(null!==s&&"undefined"!=typeof window&&window.location){var d=new URL(window.location.href).searchParams;d.has("console.level")&&i.log.setLevel(s,d.get("console.level").slice(-1)[0]),d.has("console.lock")&&"true"==d.get("console.lock").slice(-1)[0]&&i.log.lock(s)}i.log.consoleLogger=s},2061:t=>{t.exports=function(t,e){for(var r=t.length,i=-1;++i<r;)t[i]^=e[i];return t}},2153:(t,e,r)=>{var i=e;i._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var i=t[r];e[i]=r})),e},i.der=r(4598)},2211:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698),a=r(7626),s=r(2808);function o(){this.tmp=new Array(2),this.keys=null}function h(t){s.call(this,t);var e=new o;this._desState=e,this.deriveKeys(e,t.key)}n(h,s),t.exports=h,h.create=function(t){return new h(t)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];h.prototype.deriveKeys=function(t,e){t.keys=new Array(32),i.equal(e.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(e,0),n=a.readUInt32BE(e,4);a.pc1(r,n,t.tmp,0),r=t.tmp[0],n=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var o=u[s>>>1];r=a.r28shl(r,o),n=a.r28shl(n,o),a.pc2(r,n,t.keys,s)}},h.prototype._update=function(t,e,r,i){var n=this._desState,s=a.readUInt32BE(t,e),o=a.readUInt32BE(t,e+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(r,s,i),a.writeUInt32BE(r,o,i+4)},h.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,i=e;i<t.length;i++)t[i]=r;return!0},h.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)i.equal(t[r],e);return t.slice(0,t.length-e)},h.prototype._encrypt=function(t,e,r,i,n){for(var s=e,o=r,h=0;h<t.keys.length;h+=2){var u=t.keys[h],f=t.keys[h+1];a.expand(o,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=a.substitute(u,f),c=o;o=(s^a.permute(l))>>>0,s=c}a.rip(o,s,i,n)},h.prototype._decrypt=function(t,e,r,i,n){for(var s=r,o=e,h=t.keys.length-2;h>=0;h-=2){var u=t.keys[h],f=t.keys[h+1];a.expand(s,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=a.substitute(u,f),c=s;s=(o^a.permute(l))>>>0,o=c}a.rip(s,o,i,n)}},2240:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},2244:(t,e,r)=>{var i=r(1158),n=r(5037);function a(t){this.rand=t||new n.Rand}t.exports=a,a.create=function(t){return new a(t)},a.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var n=new i(this.rand.generate(r))}while(n.cmp(t)>=0);return n},a.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},a.prototype.test=function(t,e,r){var n=t.bitLength(),a=i.mont(t),s=new i(1).toRed(a);e||(e=Math.max(1,n/48|0));for(var o=t.subn(1),h=0;!o.testn(h);h++);for(var u=t.shrn(h),f=o.toRed(a);e>0;e--){var l=this._randrange(new i(2),o);r&&r(l);var c=l.toRed(a).redPow(u);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var d=1;d<h;d++){if(0===(c=c.redSqr()).cmp(s))return!1;if(0===c.cmp(f))break}if(d===h)return!1}}return!0},a.prototype.getDivisor=function(t,e){var r=t.bitLength(),n=i.mont(t),a=new i(1).toRed(n);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),o=0;!s.testn(o);o++);for(var h=t.shrn(o),u=s.toRed(n);e>0;e--){var f=this._randrange(new i(2),s),l=t.gcd(f);if(0!==l.cmpn(1))return l;var c=f.toRed(n).redPow(h);if(0!==c.cmp(a)&&0!==c.cmp(u)){for(var d=1;d<o;d++){if(0===(c=c.redSqr()).cmp(a))return c.fromRed().subn(1).gcd(t);if(0===c.cmp(u))break}if(d===o)return(c=c.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},2287:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=r(6225),s=r(3349),o=i.sum32,h=i.sum32_4,u=i.sum32_5,f=a.ch32,l=a.maj32,c=a.s0_256,d=a.s1_256,p=a.g0_256,m=a.g1_256,g=n.BlockHash,y=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}i.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=h(m(r[i-2]),r[i-7],p(r[i-15]),r[i-16]);var n=this.h[0],a=this.h[1],g=this.h[2],y=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],M=this.h[7];for(s(this.k.length===r.length),i=0;i<r.length;i++){var _=u(M,d(v),f(v,b,w),this.k[i],r[i]),S=o(c(n),l(n,a,g));M=w,w=b,b=v,v=o(y,_),y=g,g=a,a=n,n=o(_,S)}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],g),this.h[3]=o(this.h[3],y),this.h[4]=o(this.h[4],v),this.h[5]=o(this.h[5],b),this.h[6]=o(this.h[6],w),this.h[7]=o(this.h[7],M)},v.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},2313:(t,e,r)=>{var i=r(276);r(8106),r(7619);var n=t.exports=i.sha512=i.sha512||{};i.md.sha512=i.md.algorithms.sha512=n;var a=i.sha384=i.sha512.sha384=i.sha512.sha384||{};a.create=function(){return n.create("SHA-384")},i.md.sha384=i.md.algorithms.sha384=a,i.sha512.sha256=i.sha512.sha256||{create:function(){return n.create("SHA-512/256")}},i.md["sha512/256"]=i.md.algorithms["sha512/256"]=i.sha512.sha256,i.sha512.sha224=i.sha512.sha224||{create:function(){return n.create("SHA-512/224")}},i.md["sha512/224"]=i.md.algorithms["sha512/224"]=i.sha512.sha224,n.create=function(t){if(o||(s=String.fromCharCode(128),s+=i.util.fillString(String.fromCharCode(0),128),h=[[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]],(u={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],u["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],u["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],u["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],o=!0),void 0===t&&(t="SHA-512"),!(t in u))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=u[t],r=null,n=i.util.createBuffer(),a=new Array(80),l=0;l<80;++l)a[l]=new Array(2);var c=64;switch(t){case"SHA-384":c=48;break;case"SHA-512/256":c=32;break;case"SHA-512/224":c=28}var d={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:c,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){d.messageLength=0,d.fullMessageLength=d.messageLength128=[];for(var t=d.messageLengthSize/4,a=0;a<t;++a)d.fullMessageLength.push(0);for(n=i.util.createBuffer(),r=new Array(e.length),a=0;a<e.length;++a)r[a]=e[a].slice(0);return d}};return d.start(),d.update=function(t,e){"utf8"===e&&(t=i.util.encodeUtf8(t));var s=t.length;d.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=d.fullMessageLength.length-1;o>=0;--o)d.fullMessageLength[o]+=s[1],s[1]=s[0]+(d.fullMessageLength[o]/4294967296>>>0),d.fullMessageLength[o]=d.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return n.putBytes(t),f(r,a,n),(n.read>2048||0===n.length())&&n.compact(),d},d.digest=function(){var e=i.util.createBuffer();e.putBytes(n.bytes());var o,h=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1;e.putBytes(s.substr(0,d.blockLength-h));for(var u=8*d.fullMessageLength[0],l=0;l<d.fullMessageLength.length-1;++l)u+=(o=8*d.fullMessageLength[l+1])/4294967296>>>0,e.putInt32(u>>>0),u=o>>>0;e.putInt32(u);var c=new Array(r.length);for(l=0;l<r.length;++l)c[l]=r[l].slice(0);f(c,a,e);var p,m=i.util.createBuffer();for(p="SHA-512"===t?c.length:"SHA-384"===t?c.length-2:c.length-4,l=0;l<p;++l)m.putInt32(c[l][0]),l===p-1&&"SHA-512/224"===t||m.putInt32(c[l][1]);return m},d};var s=null,o=!1,h=null,u=null;function f(t,e,r){for(var i,n,a,s,o,u,f,l,c,d,p,m,g,y,v,b,w,M,_,S,E,C,A,T,B,I,k,R,N,L,x,U,P,D=r.length();D>=128;){for(k=0;k<16;++k)e[k][0]=r.getInt32()>>>0,e[k][1]=r.getInt32()>>>0;for(;k<80;++k)i=(((R=(L=e[k-2])[0])>>>19|(N=L[1])<<13)^(N>>>29|R<<3)^R>>>6)>>>0,n=((R<<13|N>>>19)^(N<<3|R>>>29)^(R<<26|N>>>6))>>>0,a=(((R=(U=e[k-15])[0])>>>1|(N=U[1])<<31)^(R>>>8|N<<24)^R>>>7)>>>0,s=((R<<31|N>>>1)^(R<<24|N>>>8)^(R<<25|N>>>7))>>>0,x=e[k-7],P=e[k-16],N=n+x[1]+s+P[1],e[k][0]=i+x[0]+a+P[0]+(N/4294967296>>>0)>>>0,e[k][1]=N>>>0;for(p=t[0][0],m=t[0][1],g=t[1][0],y=t[1][1],v=t[2][0],b=t[2][1],w=t[3][0],M=t[3][1],_=t[4][0],S=t[4][1],E=t[5][0],C=t[5][1],A=t[6][0],T=t[6][1],B=t[7][0],I=t[7][1],k=0;k<80;++k)f=((_>>>14|S<<18)^(_>>>18|S<<14)^(S>>>9|_<<23))>>>0,l=(A^_&(E^A))>>>0,o=((p>>>28|m<<4)^(m>>>2|p<<30)^(m>>>7|p<<25))>>>0,u=((p<<4|m>>>28)^(m<<30|p>>>2)^(m<<25|p>>>7))>>>0,c=(p&g|v&(p^g))>>>0,d=(m&y|b&(m^y))>>>0,N=I+(((_<<18|S>>>14)^(_<<14|S>>>18)^(S<<23|_>>>9))>>>0)+((T^S&(C^T))>>>0)+h[k][1]+e[k][1],i=B+f+l+h[k][0]+e[k][0]+(N/4294967296>>>0)>>>0,n=N>>>0,a=o+c+((N=u+d)/4294967296>>>0)>>>0,s=N>>>0,B=A,I=T,A=E,T=C,E=_,C=S,_=w+i+((N=M+n)/4294967296>>>0)>>>0,S=N>>>0,w=v,M=b,v=g,b=y,g=p,y=m,p=i+a+((N=n+s)/4294967296>>>0)>>>0,m=N>>>0;N=t[0][1]+m,t[0][0]=t[0][0]+p+(N/4294967296>>>0)>>>0,t[0][1]=N>>>0,N=t[1][1]+y,t[1][0]=t[1][0]+g+(N/4294967296>>>0)>>>0,t[1][1]=N>>>0,N=t[2][1]+b,t[2][0]=t[2][0]+v+(N/4294967296>>>0)>>>0,t[2][1]=N>>>0,N=t[3][1]+M,t[3][0]=t[3][0]+w+(N/4294967296>>>0)>>>0,t[3][1]=N>>>0,N=t[4][1]+S,t[4][0]=t[4][0]+_+(N/4294967296>>>0)>>>0,t[4][1]=N>>>0,N=t[5][1]+C,t[5][0]=t[5][0]+E+(N/4294967296>>>0)>>>0,t[5][1]=N>>>0,N=t[6][1]+T,t[6][0]=t[6][0]+A+(N/4294967296>>>0)>>>0,t[6][1]=N>>>0,N=t[7][1]+I,t[7][0]=t[7][0]+B+(N/4294967296>>>0)>>>0,t[7][1]=N>>>0,D-=128}}},2344:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8982).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,P=x>>>13,D=0|s[9],O=8191&D,j=D>>>13,K=0|o[0],q=8191&K,V=K>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(P,q)|0,a=Math.imul(P,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(j,q)|0,a=Math.imul(j,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(P,z)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(j,z)|0,a=Math.imul(j,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(j,Z)|0,a=Math.imul(j,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(j,Y)|0,a=Math.imul(j,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(j,rt)|0,a=Math.imul(j,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(j,at)|0,a=Math.imul(j,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(P,ht)|0,a=a+Math.imul(P,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(j,ht)|0,a=Math.imul(j,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(j,pt)|0))<<13)|0;return u=((a=Math.imul(j,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2356:(t,e,r)=>{var i=r(462),n=r(2861).Buffer,a=r(6168),s=r(6698),o=r(5892),h=r(295),u=r(5122);function f(t,e,r,s){a.call(this);var h=n.alloc(4,0);this._cipher=new i.AES(e);var f=this._cipher.encryptBlock(h);this._ghash=new o(f),r=function(t,e,r){if(12===e.length)return t._finID=n.concat([e,n.from([0,0,0,1])]),n.concat([e,n.from([0,0,0,2])]);var i=new o(r),a=e.length,s=a%16;i.update(e),s&&(s=16-s,i.update(n.alloc(s,0))),i.update(n.alloc(8,0));var h=8*a,f=n.alloc(8);f.writeUIntBE(h,0,8),i.update(f),t._finID=i.state;var l=n.from(t._finID);return u(l),l}(this,r,f),this._prev=n.from(r),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(f,a),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=n.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=h(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},f.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=f},2385:(t,e,r)=>{var i=r(276);r(7619);var n=t.exports=i.pem=i.pem||{};function a(t){for(var e=t.name+": ",r=[],i=function(t,e){return" "+e},n=0;n<t.values.length;++n)r.push(t.values[n].replace(/^(\S+\r\n)/,i));e+=r.join(",")+"\r\n";var a=0,s=-1;for(n=0;n<e.length;++n,++a)if(a>65&&-1!==s){var o=e[s];","===o?(++s,e=e.substr(0,s)+"\r\n "+e.substr(s)):e=e.substr(0,s)+"\r\n"+o+e.substr(s+1),a=n-s-1,s=-1,++n}else" "!==e[n]&&"\t"!==e[n]&&","!==e[n]||(s=n);return e}function s(t){return t.replace(/^\s+/,"")}n.encode=function(t,e){e=e||{};var r,n="-----BEGIN "+t.type+"-----\r\n";if(t.procType&&(n+=a(r={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]})),t.contentDomain&&(n+=a(r={name:"Content-Domain",values:[t.contentDomain]})),t.dekInfo&&(r={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&r.values.push(t.dekInfo.parameters),n+=a(r)),t.headers)for(var s=0;s<t.headers.length;++s)n+=a(t.headers[s]);return t.procType&&(n+="\r\n"),(n+=i.util.encode64(t.body,e.maxline||64)+"\r\n")+"-----END "+t.type+"-----\r\n"},n.decode=function(t){for(var e,r=[],n=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,o=/\r?\n/;e=n.exec(t);){var h=e[1];"NEW CERTIFICATE REQUEST"===h&&(h="CERTIFICATE REQUEST");var u={type:h,procType:null,contentDomain:null,dekInfo:null,headers:[],body:i.util.decode64(e[3])};if(r.push(u),e[2]){for(var f=e[2].split(o),l=0;e&&l<f.length;){for(var c=f[l].replace(/\s+$/,""),d=l+1;d<f.length;++d){var p=f[d];if(!/\s/.test(p[0]))break;c+=p,l=d}if(e=c.match(a)){for(var m={name:e[1],values:[]},g=e[2].split(","),y=0;y<g.length;++y)m.values.push(s(g[y]));if(u.procType)if(u.contentDomain||"Content-Domain"!==m.name)if(u.dekInfo||"DEK-Info"!==m.name)u.headers.push(m);else{if(0===m.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:g[0],parameters:g[1]||null}}else u.contentDomain=g[0]||"";else{if("Proc-Type"!==m.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==m.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:g[0],type:g[1]}}}++l}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},2438:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},2455:(t,e,r)=>{var i,n=r(5606);i=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=i},2509:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(1069).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,P=x>>>13,D=0|s[9],O=8191&D,j=D>>>13,K=0|o[0],q=8191&K,V=K>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(P,q)|0,a=Math.imul(P,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(j,q)|0,a=Math.imul(j,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(P,z)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(j,z)|0,a=Math.imul(j,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(j,Z)|0,a=Math.imul(j,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(j,Y)|0,a=Math.imul(j,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(j,rt)|0,a=Math.imul(j,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(j,at)|0,a=Math.imul(j,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(P,ht)|0,a=a+Math.imul(P,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(j,ht)|0,a=Math.imul(j,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(j,pt)|0))<<13)|0;return u=((a=Math.imul(j,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2632:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},2668:()=>{},2698:(t,e,r)=>{var i=r(276);if(r(9504),r(2746),r(9095),r(8106),r(6418),r(3254),r(2385),r(9356),r(5124),r(5805),r(7619),void 0===n)var n=i.jsbn.BigInteger;var a=i.asn1,s=i.pki=i.pki||{};t.exports=s.pbe=i.pbe=i.pbe||{};var o=s.oids,h={name:"EncryptedPrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},u={name:"PBES2Algorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},f={name:"pkcs-12PbeParams",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"iterations"}]};function l(t,e){return t.start().update(e).digest().getBytes()}function c(t){var e;if(t){if(!(e=s.oids[a.derToOid(t)])){var r=new Error("Unsupported PRF OID.");throw r.oid=t,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else e="hmacWithSHA1";return d(e)}function d(t){var e=i.md;switch(t){case"hmacWithSHA224":e=i.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":t=t.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=t,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!e||!(t in e))throw new Error("Unknown hash algorithm: "+t);return e[t].create()}s.encryptPrivateKeyInfo=function(t,e,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n,h,u,f=i.random.getBytesSync(r.saltSize),l=r.count,c=a.integerToDer(l);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var p,m,g;switch(r.algorithm){case"aes128":n=16,p=16,m=o["aes128-CBC"],g=i.aes.createEncryptionCipher;break;case"aes192":n=24,p=16,m=o["aes192-CBC"],g=i.aes.createEncryptionCipher;break;case"aes256":n=32,p=16,m=o["aes256-CBC"],g=i.aes.createEncryptionCipher;break;case"des":n=8,p=8,m=o.desCBC,g=i.des.createEncryptionCipher;break;default:throw(_=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,_}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),v=d(y),b=i.pkcs5.pbkdf2(e,f,l,n,v),w=i.random.getBytesSync(p);(S=g(b)).start(w),S.update(a.toDer(t)),S.finish(),u=S.output.getBytes();var M=function(t,e,r,n){var o=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,t),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,e.getBytes())]);return"hmacWithSHA1"!==n&&o.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,i.util.hexToBytes(r.toString(16))),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.oids[n]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])),o}(f,c,n,y);h=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.pkcs5PBES2).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.pkcs5PBKDF2).getBytes()),M]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(m).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,w)])])])}else{var _;if("3des"!==r.algorithm)throw(_=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,_;n=24;var S,E=new i.util.ByteBuffer(f);b=s.pbe.generatePkcs12Key(e,E,1,l,n),w=s.pbe.generatePkcs12Key(e,E,2,l,n),(S=i.des.createEncryptionCipher(b)).start(w),S.update(a.toDer(t)),S.finish(),u=S.output.getBytes(),h=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,f),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,c.getBytes())])])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[h,a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,u)])},s.decryptPrivateKeyInfo=function(t,e){var r=null,n={},o=[];if(!a.validate(t,h,n,o)){var u=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw u.errors=o,u}var f=a.derToOid(n.encryptionOid),l=s.pbe.getCipher(f,n.encryptionParams,e),c=i.util.createBuffer(n.encryptedData);return l.update(c),l.finish()&&(r=a.fromDer(l.output)),r},s.encryptedPrivateKeyToPem=function(t,e){var r={type:"ENCRYPTED PRIVATE KEY",body:a.toDer(t).getBytes()};return i.pem.encode(r,{maxline:e})},s.encryptedPrivateKeyFromPem=function(t){var e=i.pem.decode(t)[0];if("ENCRYPTED PRIVATE KEY"!==e.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return a.fromDer(e.body)},s.encryptRsaPrivateKey=function(t,e,r){if(!(r=r||{}).legacy){var n=s.wrapRsaPrivateKey(s.privateKeyToAsn1(t));return n=s.encryptPrivateKeyInfo(n,e,r),s.encryptedPrivateKeyToPem(n)}var o,h,u,f;switch(r.algorithm){case"aes128":o="AES-128-CBC",u=16,h=i.random.getBytesSync(16),f=i.aes.createEncryptionCipher;break;case"aes192":o="AES-192-CBC",u=24,h=i.random.getBytesSync(16),f=i.aes.createEncryptionCipher;break;case"aes256":o="AES-256-CBC",u=32,h=i.random.getBytesSync(16),f=i.aes.createEncryptionCipher;break;case"3des":o="DES-EDE3-CBC",u=24,h=i.random.getBytesSync(8),f=i.des.createEncryptionCipher;break;case"des":o="DES-CBC",u=8,h=i.random.getBytesSync(8),f=i.des.createEncryptionCipher;break;default:var l=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw l.algorithm=r.algorithm,l}var c=f(i.pbe.opensslDeriveBytes(e,h.substr(0,8),u));c.start(h),c.update(a.toDer(s.privateKeyToAsn1(t))),c.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:o,parameters:i.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return i.pem.encode(d)},s.decryptRsaPrivateKey=function(t,e){var r=null,n=i.pem.decode(t)[0];if("ENCRYPTED PRIVATE KEY"!==n.type&&"PRIVATE KEY"!==n.type&&"RSA PRIVATE KEY"!==n.type)throw(u=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=u,u;if(n.procType&&"ENCRYPTED"===n.procType.type){var o,h;switch(n.dekInfo.algorithm){case"DES-CBC":o=8,h=i.des.createDecryptionCipher;break;case"DES-EDE3-CBC":o=24,h=i.des.createDecryptionCipher;break;case"AES-128-CBC":o=16,h=i.aes.createDecryptionCipher;break;case"AES-192-CBC":o=24,h=i.aes.createDecryptionCipher;break;case"AES-256-CBC":o=32,h=i.aes.createDecryptionCipher;break;case"RC2-40-CBC":o=5,h=function(t){return i.rc2.createDecryptionCipher(t,40)};break;case"RC2-64-CBC":o=8,h=function(t){return i.rc2.createDecryptionCipher(t,64)};break;case"RC2-128-CBC":o=16,h=function(t){return i.rc2.createDecryptionCipher(t,128)};break;default:var u;throw(u=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".')).algorithm=n.dekInfo.algorithm,u}var f=i.util.hexToBytes(n.dekInfo.parameters),l=h(i.pbe.opensslDeriveBytes(e,f.substr(0,8),o));if(l.start(f),l.update(i.util.createBuffer(n.body)),!l.finish())return r;r=l.output.getBytes()}else r=n.body;return null!==(r="ENCRYPTED PRIVATE KEY"===n.type?s.decryptPrivateKeyInfo(a.fromDer(r),e):a.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(t,e,r,n,a,s){var o,h;if(null==s){if(!("sha1"in i.md))throw new Error('"sha1" hash algorithm unavailable.');s=i.md.sha1.create()}var u=s.digestLength,f=s.blockLength,l=new i.util.ByteBuffer,c=new i.util.ByteBuffer;if(null!=t){for(h=0;h<t.length;h++)c.putInt16(t.charCodeAt(h));c.putInt16(0)}var d=c.length(),p=e.length(),m=new i.util.ByteBuffer;m.fillWithByte(r,f);var g=f*Math.ceil(p/f),y=new i.util.ByteBuffer;for(h=0;h<g;h++)y.putByte(e.at(h%p));var v=f*Math.ceil(d/f),b=new i.util.ByteBuffer;for(h=0;h<v;h++)b.putByte(c.at(h%d));var w=y;w.putBuffer(b);for(var M=Math.ceil(a/u),_=1;_<=M;_++){var S=new i.util.ByteBuffer;S.putBytes(m.bytes()),S.putBytes(w.bytes());for(var E=0;E<n;E++)s.start(),s.update(S.getBytes()),S=s.digest();var C=new i.util.ByteBuffer;for(h=0;h<f;h++)C.putByte(S.at(h%u));var A=Math.ceil(p/f)+Math.ceil(d/f),T=new i.util.ByteBuffer;for(o=0;o<A;o++){var B=new i.util.ByteBuffer(w.getBytes(f)),I=511;for(h=C.length()-1;h>=0;h--)I>>=8,I+=C.at(h)+B.at(h),B.setAt(h,255&I);T.putBuffer(B)}w=T,l.putBuffer(S)}return l.truncate(l.length()-a),l},s.pbe.getCipher=function(t,e,r){switch(t){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(t,e,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(t,e,r);default:var i=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw i.oid=t,i.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],i}},s.pbe.getCipherForPBES2=function(t,e,r){var n,o={},h=[];if(!a.validate(e,u,o,h))throw(n=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=h,n;if((t=a.derToOid(o.kdfOid))!==s.oids.pkcs5PBKDF2)throw(n=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=t,n.supportedOids=["pkcs5PBKDF2"],n;if((t=a.derToOid(o.encOid))!==s.oids["aes128-CBC"]&&t!==s.oids["aes192-CBC"]&&t!==s.oids["aes256-CBC"]&&t!==s.oids["des-EDE3-CBC"]&&t!==s.oids.desCBC)throw(n=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=t,n.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],n;var f,l,d=o.kdfSalt,p=i.util.createBuffer(o.kdfIterationCount);switch(p=p.getInt(p.length()<<3),s.oids[t]){case"aes128-CBC":f=16,l=i.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,l=i.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,l=i.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,l=i.des.createDecryptionCipher;break;case"desCBC":f=8,l=i.des.createDecryptionCipher}var m=c(o.prfOid),g=i.pkcs5.pbkdf2(r,d,p,f,m),y=o.encIv,v=l(g);return v.start(y),v},s.pbe.getCipherForPKCS12PBE=function(t,e,r){var n={},o=[];if(!a.validate(e,f,n,o))throw(m=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=o,m;var h,u,l,d=i.util.createBuffer(n.salt),p=i.util.createBuffer(n.iterations);switch(p=p.getInt(p.length()<<3),t){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:h=24,u=8,l=i.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:h=5,u=8,l=function(t,e){var r=i.rc2.createDecryptionCipher(t,40);return r.start(e,null),r};break;default:var m;throw(m=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=t,m}var g=c(n.prfOid),y=s.pbe.generatePkcs12Key(r,d,1,p,h,g);return g.start(),l(y,s.pbe.generatePkcs12Key(r,d,2,p,u,g))},s.pbe.opensslDeriveBytes=function(t,e,r,n){if(null==n){if(!("md5"in i.md))throw new Error('"md5" hash algorithm unavailable.');n=i.md.md5.create()}null===e&&(e="");for(var a=[l(n,t+e)],s=16,o=1;s<r;++o,s+=16)a.push(l(n,a[o-1]+t+e));return a.join("").substr(0,r)}},2723:(t,e,r)=>{"use strict";var i=r(7952),n=r(4367),a=r(3349);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(t.entropy,t.entropyEnc||"hex"),r=n.toArray(t.nonce,t.nonceEnc||"hex"),i=n.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}t.exports=s,s.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,i){"string"!=typeof e&&(i=r,r=e,e=null),t=n.toArray(t,e),r=n.toArray(r,i),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=r,r=e,e=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var s=a.slice(0,t);return this._update(r),this._reseed++,n.encode(s,e)}},2726:(t,e,r)=>{"use strict";function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function o(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}var h=r(8287).Buffer,u=r(5340).inspect,f=u&&u.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return h.alloc(0);for(var e,r,i,n=h.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=n,i=s,h.prototype.copy.call(e,r,i),s+=a.data.length,a=a.next;return n}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,i=e.data;for(t-=i.length;e=e.next;){var n=e.data,a=t>n.length?n.length:t;if(a===n.length?i+=n:i+=n.slice(0,t),0==(t-=a)){a===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(a));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=h.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,a=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,a),0==(t-=a)){a===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(a));break}++i}return this.length-=i,e}},{key:f,value:function(t,e){return u(this,n(n({},e),{},{depth:0,customInspect:!1}))}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()},2746:(t,e,r)=>{var i=r(276);r(7619),r(6418);var n=t.exports=i.asn1=i.asn1||{};function a(t,e,r){if(r>e){var i=new Error("Too few bytes to parse DER.");throw i.available=t.length(),i.remaining=e,i.requested=r,i}}function s(t,e,r,i){var o;a(t,e,2);var h=t.getByte();e--;var u=192&h,f=31&h;o=t.length();var l,c,d=function(t,e){var r=t.getByte();if(e--,128!==r){var i;if(128&r){var n=127&r;a(t,e,n),i=t.getInt(n<<3)}else i=r;if(i<0)throw new Error("Negative length: "+i);return i}}(t,e);if(e-=o-t.length(),void 0!==d&&d>e){if(i.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=t.length(),p.remaining=e,p.requested=d,p}d=e}var m=!(32&~h);if(m)if(l=[],void 0===d)for(;;){if(a(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}o=t.length(),l.push(s(t,e,r+1,i)),e-=o-t.length()}else for(;d>0;)o=t.length(),l.push(s(t,d,r+1,i)),e-=o-t.length(),d-=o-t.length();if(void 0===l&&u===n.Class.UNIVERSAL&&f===n.Type.BITSTRING&&(c=t.bytes(d)),void 0===l&&i.decodeBitStrings&&u===n.Class.UNIVERSAL&&f===n.Type.BITSTRING&&d>1){var g=t.read,y=e,v=0;if(f===n.Type.BITSTRING&&(a(t,e,1),v=t.getByte(),e--),0===v)try{o=t.length();var b=s(t,e,r+1,{strict:!0,decodeBitStrings:!0}),w=o-t.length();e-=w,f==n.Type.BITSTRING&&w++;var M=b.tagClass;w!==d||M!==n.Class.UNIVERSAL&&M!==n.Class.CONTEXT_SPECIFIC||(l=[b])}catch(t){}void 0===l&&(t.read=g,e=y)}if(void 0===l){if(void 0===d){if(i.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=e}if(f===n.Type.BMPSTRING)for(l="";d>0;d-=2)a(t,e,2),l+=String.fromCharCode(t.getInt16()),e-=2;else l=t.getBytes(d),e-=d}var _=void 0===c?null:{bitStringContents:c};return n.create(u,f,m,l,_)}n.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},n.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},n.create=function(t,e,r,a,s){if(i.util.isArray(a)){for(var o=[],h=0;h<a.length;++h)void 0!==a[h]&&o.push(a[h]);a=o}var u={tagClass:t,type:e,constructed:r,composed:r||i.util.isArray(a),value:a};return s&&"bitStringContents"in s&&(u.bitStringContents=s.bitStringContents,u.original=n.copy(u)),u},n.copy=function(t,e){var r;if(i.util.isArray(t)){r=[];for(var a=0;a<t.length;++a)r.push(n.copy(t[a],e));return r}return"string"==typeof t?t:(r={tagClass:t.tagClass,type:t.type,constructed:t.constructed,composed:t.composed,value:n.copy(t.value,e)},e&&!e.excludeBitStringContents&&(r.bitStringContents=t.bitStringContents),r)},n.equals=function(t,e,r){if(i.util.isArray(t)){if(!i.util.isArray(e))return!1;if(t.length!==e.length)return!1;for(var a=0;a<t.length;++a)if(!n.equals(t[a],e[a]))return!1;return!0}if(typeof t!=typeof e)return!1;if("string"==typeof t)return t===e;var s=t.tagClass===e.tagClass&&t.type===e.type&&t.constructed===e.constructed&&t.composed===e.composed&&n.equals(t.value,e.value);return r&&r.includeBitStringContents&&(s=s&&t.bitStringContents===e.bitStringContents),s},n.getBerValueLength=function(t){var e=t.getByte();if(128!==e)return 128&e?t.getInt((127&e)<<3):e},n.fromDer=function(t,e){void 0===e&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"==typeof e&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),"string"==typeof t&&(t=i.util.createBuffer(t));var r=t.length(),n=s(t,t.length(),0,e);if(e.parseAllBytes&&0!==t.length()){var a=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw a.byteCount=r,a.remaining=t.length(),a}return n},n.toDer=function(t){var e=i.util.createBuffer(),r=t.tagClass|t.type,a=i.util.createBuffer(),s=!1;if("bitStringContents"in t&&(s=!0,t.original&&(s=n.equals(t,t.original))),s)a.putBytes(t.bitStringContents);else if(t.composed){t.constructed?r|=32:a.putByte(0);for(var o=0;o<t.value.length;++o)void 0!==t.value[o]&&a.putBuffer(n.toDer(t.value[o]))}else if(t.type===n.Type.BMPSTRING)for(o=0;o<t.value.length;++o)a.putInt16(t.value.charCodeAt(o));else!(t.type===n.Type.INTEGER&&t.value.length>1)||(0!==t.value.charCodeAt(0)||128&t.value.charCodeAt(1))&&(255!==t.value.charCodeAt(0)||128&~t.value.charCodeAt(1))?a.putBytes(t.value):a.putBytes(t.value.substr(1));if(e.putByte(r),a.length()<=127)e.putByte(127&a.length());else{var h=a.length(),u="";do{u+=String.fromCharCode(255&h),h>>>=8}while(h>0);for(e.putByte(128|u.length),o=u.length-1;o>=0;--o)e.putByte(u.charCodeAt(o))}return e.putBuffer(a),e},n.oidToDer=function(t){var e,r,n,a,s=t.split("."),o=i.util.createBuffer();o.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var h=2;h<s.length;++h){e=!0,r=[],n=parseInt(s[h],10);do{a=127&n,n>>>=7,e||(a|=128),r.push(a),e=!1}while(n>0);for(var u=r.length-1;u>=0;--u)o.putByte(r[u])}return o},n.derToOid=function(t){var e;"string"==typeof t&&(t=i.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var n=0;t.length()>0;)n<<=7,128&(r=t.getByte())?n+=127&r:(e+="."+(n+r),n=0);return e},n.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var i=parseInt(t.substr(2,2),10)-1,n=parseInt(t.substr(4,2),10),a=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),o=0;if(t.length>11){var h=t.charAt(10),u=10;"+"!==h&&"-"!==h&&(o=parseInt(t.substr(10,2),10),u+=2)}if(e.setUTCFullYear(r,i,n),e.setUTCHours(a,s,o,0),u&&("+"===(h=t.charAt(u))||"-"===h)){var f=60*parseInt(t.substr(u+1,2),10)+parseInt(t.substr(u+4,2),10);f*=6e4,"+"===h?e.setTime(+e-f):e.setTime(+e+f)}return e},n.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),i=parseInt(t.substr(4,2),10)-1,n=parseInt(t.substr(6,2),10),a=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),h=0,u=0,f=!1;"Z"===t.charAt(t.length-1)&&(f=!0);var l=t.length-5,c=t.charAt(l);return"+"!==c&&"-"!==c||(u=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10),u*=6e4,"+"===c&&(u*=-1),f=!0),"."===t.charAt(14)&&(h=1e3*parseFloat(t.substr(14),10)),f?(e.setUTCFullYear(r,i,n),e.setUTCHours(a,s,o,h),e.setTime(+e+u)):(e.setFullYear(r,i,n),e.setHours(a,s,o,h)),e},n.dateToUtcTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var i=0;i<r.length;++i)r[i].length<2&&(e+="0"),e+=r[i];return e+"Z"},n.dateToGeneralizedTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push(""+t.getUTCFullYear()),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var i=0;i<r.length;++i)r[i].length<2&&(e+="0"),e+=r[i];return e+"Z"},n.integerToDer=function(t){var e=i.util.createBuffer();if(t>=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},n.derToInteger=function(t){"string"==typeof t&&(t=i.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},n.validate=function(t,e,r,a){var s=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)a&&(t.tagClass!==e.tagClass&&a.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&a.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(s=!0,e.value&&i.util.isArray(e.value))for(var o=0,h=0;s&&h<e.value.length;++h)s=e.value[h].optional||!1,t.value[o]&&((s=n.validate(t.value[o],e.value[h],r,a))?++o:e.value[h].optional&&(s=!0)),!s&&a&&a.push("["+e.name+'] Tag class "'+e.tagClass+'", type "'+e.type+'" expected value length "'+e.value.length+'", got "'+t.value.length+'"');if(s&&r&&(e.capture&&(r[e.capture]=t.value),e.captureAsn1&&(r[e.captureAsn1]=t),e.captureBitStringContents&&"bitStringContents"in t&&(r[e.captureBitStringContents]=t.bitStringContents),e.captureBitStringValue&&"bitStringContents"in t))if(t.bitStringContents.length<2)r[e.captureBitStringValue]="";else{if(0!==t.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[e.captureBitStringValue]=t.bitStringContents.slice(1)}}else a&&a.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+t.constructed+'"');return s};var o=/[^\\u0000-\\u00ff]/;n.prettyPrint=function(t,e,r){var a="";r=r||2,(e=e||0)>0&&(a+="\n");for(var s="",h=0;h<e*r;++h)s+=" ";switch(a+=s+"Tag: ",t.tagClass){case n.Class.UNIVERSAL:a+="Universal:";break;case n.Class.APPLICATION:a+="Application:";break;case n.Class.CONTEXT_SPECIFIC:a+="Context-Specific:";break;case n.Class.PRIVATE:a+="Private:"}if(t.tagClass===n.Class.UNIVERSAL)switch(a+=t.type,t.type){case n.Type.NONE:a+=" (None)";break;case n.Type.BOOLEAN:a+=" (Boolean)";break;case n.Type.INTEGER:a+=" (Integer)";break;case n.Type.BITSTRING:a+=" (Bit string)";break;case n.Type.OCTETSTRING:a+=" (Octet string)";break;case n.Type.NULL:a+=" (Null)";break;case n.Type.OID:a+=" (Object Identifier)";break;case n.Type.ODESC:a+=" (Object Descriptor)";break;case n.Type.EXTERNAL:a+=" (External or Instance of)";break;case n.Type.REAL:a+=" (Real)";break;case n.Type.ENUMERATED:a+=" (Enumerated)";break;case n.Type.EMBEDDED:a+=" (Embedded PDV)";break;case n.Type.UTF8:a+=" (UTF8)";break;case n.Type.ROID:a+=" (Relative Object Identifier)";break;case n.Type.SEQUENCE:a+=" (Sequence)";break;case n.Type.SET:a+=" (Set)";break;case n.Type.PRINTABLESTRING:a+=" (Printable String)";break;case n.Type.IA5String:a+=" (IA5String (ASCII))";break;case n.Type.UTCTIME:a+=" (UTC time)";break;case n.Type.GENERALIZEDTIME:a+=" (Generalized time)";break;case n.Type.BMPSTRING:a+=" (BMP String)"}else a+=t.type;if(a+="\n",a+=s+"Constructed: "+t.constructed+"\n",t.composed){var u=0,f="";for(h=0;h<t.value.length;++h)void 0!==t.value[h]&&(u+=1,f+=n.prettyPrint(t.value[h],e+1,r),h+1<t.value.length&&(f+=","));a+=s+"Sub values: "+u+f}else{if(a+=s+"Value: ",t.type===n.Type.OID){var l=n.derToOid(t.value);a+=l,i.pki&&i.pki.oids&&l in i.pki.oids&&(a+=" ("+i.pki.oids[l]+") ")}if(t.type===n.Type.INTEGER)try{a+=n.derToInteger(t.value)}catch(e){a+="0x"+i.util.bytesToHex(t.value)}else if(t.type===n.Type.BITSTRING){if(t.value.length>1?a+="0x"+i.util.bytesToHex(t.value.slice(1)):a+="(none)",t.value.length>0){var c=t.value.charCodeAt(0);1==c?a+=" (1 unused bit shown)":c>1&&(a+=" ("+c+" unused bits shown)")}}else if(t.type===n.Type.OCTETSTRING)o.test(t.value)||(a+="("+t.value+") "),a+="0x"+i.util.bytesToHex(t.value);else if(t.type===n.Type.UTF8)try{a+=i.util.decodeUtf8(t.value)}catch(e){if("URI malformed"!==e.message)throw e;a+="0x"+i.util.bytesToHex(t.value)+" (malformed UTF8)"}else t.type===n.Type.PRINTABLESTRING||t.type===n.Type.IA5String?a+=t.value:o.test(t.value)?a+="0x"+i.util.bytesToHex(t.value):0===t.value.length?a+="[null]":a+=t.value}return a}},2801:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7965).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,P=x>>>13,D=0|s[9],O=8191&D,j=D>>>13,K=0|o[0],q=8191&K,V=K>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(P,q)|0,a=Math.imul(P,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(j,q)|0,a=Math.imul(j,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(P,z)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(j,z)|0,a=Math.imul(j,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(j,Z)|0,a=Math.imul(j,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(j,Y)|0,a=Math.imul(j,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(j,rt)|0,a=Math.imul(j,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(j,at)|0,a=Math.imul(j,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(P,ht)|0,a=a+Math.imul(P,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(j,ht)|0,a=Math.imul(j,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(j,pt)|0))<<13)|0;return u=((a=Math.imul(j,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2802:(t,e,r)=>{var i=t.exports=function(t){t=t.toLowerCase();var e=i[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};i.sha=r(7816),i.sha1=r(3737),i.sha224=r(6710),i.sha256=r(4107),i.sha384=r(2827),i.sha512=r(2890)},2808:(t,e,r)=>{"use strict";var i=r(3349);function n(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}t.exports=n,n.prototype._init=function(){},n.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},n.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),i=0;i<r;i++)this.buffer[this.bufferOff+i]=t[e+i];return this.bufferOff+=r,r},n.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(t){var e=0,r=0,i=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var a=t.length-(t.length-e)%this.blockSize;e<a;e+=this.blockSize)this._update(t,e,n,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},n.prototype._updateDecrypt=function(t){for(var e=0,r=0,i=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)e+=this._buffer(t,e),r+=this._flushBuffer(n,r);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},n.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},n.prototype._unpad=function(t){return t},n.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},2827:(t,e,r)=>{var i=r(6698),n=r(2890),a=r(392),s=r(2861).Buffer,o=new Array(160);function h(){this.init(),this._w=o,a.call(this,128,112)}i(h,n),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=h},2853:(t,e,r)=>{var i=e;i.der=r(2010),i.pem=r(8903)},2861:(t,e,r)=>{var i=r(8287),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(a(i,e),e.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},2884:(t,e,r)=>{var i=r(295);e.encrypt=function(t,e){var r=i(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return i(n,r)}},2890:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).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],o=new Array(160);function h(){this.init(),this._w=o,n.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function c(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0<e>>>0?1:0}i(h,n),h.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},h.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,h=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,M=0|this._bl,_=0|this._cl,S=0|this._dl,E=0|this._el,C=0|this._fl,A=0|this._gl,T=0|this._hl,B=0;B<32;B+=2)e[B]=t.readInt32BE(4*B),e[B+1]=t.readInt32BE(4*B+4);for(;B<160;B+=2){var I=e[B-30],k=e[B-30+1],R=d(I,k),N=p(k,I),L=m(I=e[B-4],k=e[B-4+1]),x=g(k,I),U=e[B-14],P=e[B-14+1],D=e[B-32],O=e[B-32+1],j=N+P|0,K=R+U+y(j,N)|0;K=(K=K+L+y(j=j+x|0,x)|0)+D+y(j=j+O|0,O)|0,e[B]=K,e[B+1]=j}for(var q=0;q<160;q+=2){K=e[q],j=e[q+1];var V=f(r,i,n),F=f(w,M,_),z=l(r,w),H=l(w,r),G=c(o,E),Z=c(E,o),W=s[q],Q=s[q+1],Y=u(o,h,v),X=u(E,C,A),J=T+Z|0,$=b+G+y(J,T)|0;$=($=($=$+Y+y(J=J+X|0,X)|0)+W+y(J=J+Q|0,Q)|0)+K+y(J=J+j|0,j)|0;var tt=H+F|0,et=z+V+y(tt,H)|0;b=v,T=A,v=h,A=C,h=o,C=E,o=a+$+y(E=S+J|0,S)|0,a=n,S=_,n=i,_=M,i=r,M=w,r=$+et+y(w=J+tt|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+M|0,this._cl=this._cl+_|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+C|0,this._gl=this._gl+A|0,this._hl=this._hl+T|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+i+y(this._bl,M)|0,this._ch=this._ch+n+y(this._cl,_)|0,this._dh=this._dh+a+y(this._dl,S)|0,this._eh=this._eh+o+y(this._el,E)|0,this._fh=this._fh+h+y(this._fl,C)|0,this._gh=this._gh+v+y(this._gl,A)|0,this._hh=this._hh+b+y(this._hl,T)|0},h.prototype._hash=function(){var t=a.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=h},2926:(t,e,r)=>{var i=r(8287).Buffer,n=r(276);r(3736),r(9356),r(2313),r(7619);var a=r(4309),s=a.publicKeyValidator,o=a.privateKeyValidator;if(void 0===h)var h=n.jsbn.BigInteger;var u=n.util.ByteBuffer,f=void 0===i?Uint8Array:i;n.pki=n.pki||{},t.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var l=n.ed25519;function c(t){var e=t.message;if(e instanceof Uint8Array||e instanceof f)return e;var r=t.encoding;if(void 0===e){if(!t.md)throw new TypeError('"options.message" or "options.md" not specified.');e=t.md.digest().getBytes(),r="binary"}if("string"==typeof e&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof e){if(void 0!==i)return i.from(e,r);e=new u(e,r)}else if(!(e instanceof u))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new f(e.length()),a=0;a<n.length;++a)n[a]=e.at(a);return n}l.constants={},l.constants.PUBLIC_KEY_BYTE_LENGTH=32,l.constants.PRIVATE_KEY_BYTE_LENGTH=64,l.constants.SEED_BYTE_LENGTH=32,l.constants.SIGN_BYTE_LENGTH=64,l.constants.HASH_BYTE_LENGTH=64,l.generateKeyPair=function(t){var e=(t=t||{}).seed;if(void 0===e)e=n.random.getBytesSync(l.constants.SEED_BYTE_LENGTH);else if("string"==typeof e){if(e.length!==l.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+l.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=c({message:e,encoding:"binary"});for(var r=new f(l.constants.PUBLIC_KEY_BYTE_LENGTH),i=new f(l.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)i[a]=e[a];return function(t,e){var r,i=[P(),P(),P(),P()],n=M(e,32);for(n[0]&=248,n[31]&=127,n[31]|=64,N(i,n),A(t,i),r=0;r<32;++r)e[r+32]=t[r]}(r,i),{publicKey:r,privateKey:i}},l.privateKeyFromAsn1=function(t){var e={},r=[];if(!n.asn1.validate(t,o,e,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=n.asn1.derToOid(e.privateKeyOid),s=n.oids.EdDSA25519;if(a!==s)throw new Error('Invalid OID "'+a+'"; OID must be "'+s+'".');var h=e.privateKey;return{privateKeyBytes:c({message:n.asn1.fromDer(h).value,encoding:"binary"})}},l.publicKeyFromAsn1=function(t){var e={},r=[];if(!n.asn1.validate(t,s,e,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=n.asn1.derToOid(e.publicKeyOid),o=n.oids.EdDSA25519;if(a!==o)throw new Error('Invalid OID "'+a+'"; OID must be "'+o+'".');var h=e.ed25519PublicKey;if(h.length!==l.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return c({message:h,encoding:"binary"})},l.publicKeyFromPrivateKey=function(t){var e=c({message:(t=t||{}).privateKey,encoding:"binary"});if(e.length!==l.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+l.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new f(l.constants.PUBLIC_KEY_BYTE_LENGTH),i=0;i<r.length;++i)r[i]=e[32+i];return r},l.sign=function(t){var e=c(t=t||{}),r=c({message:t.privateKey,encoding:"binary"});if(r.length===l.constants.SEED_BYTE_LENGTH)r=l.generateKeyPair({seed:r}).privateKey;else if(r.length!==l.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+l.constants.SEED_BYTE_LENGTH+" or "+l.constants.PRIVATE_KEY_BYTE_LENGTH);var i=new f(l.constants.SIGN_BYTE_LENGTH+e.length);!function(t,e,r,i){var n,a,s=new Float64Array(64),o=[P(),P(),P(),P()],h=M(i,32);h[0]&=248,h[31]&=127,h[31]|=64;for(n=0;n<r;++n)t[64+n]=e[n];for(n=0;n<32;++n)t[32+n]=h[32+n];var u=M(t.subarray(32),r+32);for(S(u),N(o,u),A(t,o),n=32;n<64;++n)t[n]=i[n];var f=M(t,r+64);for(S(f),n=32;n<64;++n)s[n]=0;for(n=0;n<32;++n)s[n]=u[n];for(n=0;n<32;++n)for(a=0;a<32;a++)s[n+a]+=f[n]*h[a];_(t.subarray(32),s)}(i,e,e.length,r);for(var n=new f(l.constants.SIGN_BYTE_LENGTH),a=0;a<n.length;++a)n[a]=i[a];return n},l.verify=function(t){var e=c(t=t||{});if(void 0===t.signature)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=c({message:t.signature,encoding:"binary"});if(r.length!==l.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+l.constants.SIGN_BYTE_LENGTH);var i=c({message:t.publicKey,encoding:"binary"});if(i.length!==l.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+l.constants.PUBLIC_KEY_BYTE_LENGTH);var n,a=new f(l.constants.SIGN_BYTE_LENGTH+e.length),s=new f(l.constants.SIGN_BYTE_LENGTH+e.length);for(n=0;n<l.constants.SIGN_BYTE_LENGTH;++n)a[n]=r[n];for(n=0;n<e.length;++n)a[n+l.constants.SIGN_BYTE_LENGTH]=e[n];return function(t,e,r,i){var n,a=new f(32),s=[P(),P(),P(),P()],o=[P(),P(),P(),P()];if(r<64)return-1;if(function(t,e){var r=P(),i=P(),n=P(),a=P(),s=P(),o=P(),h=P();return L(t[2],p),function(t,e){var r;for(r=0;r<16;++r)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}(t[1],e),j(n,t[1]),K(a,n,m),O(n,n,t[2]),D(a,t[2],a),j(s,a),j(o,s),K(h,o,s),K(r,h,n),K(r,r,a),function(t,e){var r,i=P();for(r=0;r<16;++r)i[r]=e[r];for(r=250;r>=0;--r)j(i,i),1!==r&&K(i,i,e);for(r=0;r<16;++r)t[r]=i[r]}(r,r),K(r,r,n),K(r,r,a),K(r,r,a),K(t[0],r,a),j(i,t[0]),K(i,i,a),B(i,n)&&K(t[0],t[0],w),j(i,t[0]),K(i,i,a),B(i,n)?-1:(k(t[0])===e[31]>>7&&O(t[0],d,t[0]),K(t[3],t[0],t[1]),0)}(o,i))return-1;for(n=0;n<r;++n)t[n]=e[n];for(n=0;n<32;++n)t[n+32]=i[n];var h=M(t,r);if(S(h),R(s,o,h),N(o,e.subarray(32)),E(s,o),A(a,s),r-=64,I(e,0,a,0)){for(n=0;n<r;++n)t[n]=0;return-1}for(n=0;n<r;++n)t[n]=e[n+64];return r}(s,a,a.length,i)>=0};var d=P(),p=P([1]),m=P([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=P([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),y=P([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),v=P([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),b=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]),w=P([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function M(t,e){var r=n.md.sha512.create(),a=new u(t);r.update(a.getBytes(e),"binary");var s=r.digest().getBytes();if(void 0!==i)return i.from(s,"binary");for(var o=new f(l.constants.HASH_BYTE_LENGTH),h=0;h<64;++h)o[h]=s.charCodeAt(h);return o}function _(t,e){var r,i,n,a;for(i=63;i>=32;--i){for(r=0,n=i-32,a=i-12;n<a;++n)e[n]+=r-16*e[i]*b[n-(i-32)],r=e[n]+128>>8,e[n]-=256*r;e[n]+=r,e[i]=0}for(r=0,n=0;n<32;++n)e[n]+=r-(e[31]>>4)*b[n],r=e[n]>>8,e[n]&=255;for(n=0;n<32;++n)e[n]-=r*b[n];for(i=0;i<32;++i)e[i+1]+=e[i]>>8,t[i]=255&e[i]}function S(t){for(var e=new Float64Array(64),r=0;r<64;++r)e[r]=t[r],t[r]=0;_(t,e)}function E(t,e){var r=P(),i=P(),n=P(),a=P(),s=P(),o=P(),h=P(),u=P(),f=P();O(r,t[1],t[0]),O(f,e[1],e[0]),K(r,r,f),D(i,t[0],t[1]),D(f,e[0],e[1]),K(i,i,f),K(n,t[3],e[3]),K(n,n,g),K(a,t[2],e[2]),D(a,a,a),O(s,i,r),O(o,a,n),D(h,a,n),D(u,i,r),K(t[0],s,o),K(t[1],u,h),K(t[2],h,o),K(t[3],s,u)}function C(t,e,r){for(var i=0;i<4;++i)U(t[i],e[i],r)}function A(t,e){var r=P(),i=P(),n=P();!function(t,e){var r,i=P();for(r=0;r<16;++r)i[r]=e[r];for(r=253;r>=0;--r)j(i,i),2!==r&&4!==r&&K(i,i,e);for(r=0;r<16;++r)t[r]=i[r]}(n,e[2]),K(r,e[0],n),K(i,e[1],n),T(t,i),t[31]^=k(r)<<7}function T(t,e){var r,i,n,a=P(),s=P();for(r=0;r<16;++r)s[r]=e[r];for(x(s),x(s),x(s),i=0;i<2;++i){for(a[0]=s[0]-65517,r=1;r<15;++r)a[r]=s[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),n=a[15]>>16&1,a[14]&=65535,U(s,a,1-n)}for(r=0;r<16;r++)t[2*r]=255&s[r],t[2*r+1]=s[r]>>8}function B(t,e){var r=new f(32),i=new f(32);return T(r,t),T(i,e),I(r,0,i,0)}function I(t,e,r,i){return function(t,e,r,i){var n,a=0;for(n=0;n<32;++n)a|=t[e+n]^r[i+n];return(1&a-1>>>8)-1}(t,e,r,i)}function k(t){var e=new f(32);return T(e,t),1&e[0]}function R(t,e,r){var i,n;for(L(t[0],d),L(t[1],p),L(t[2],p),L(t[3],d),n=255;n>=0;--n)C(t,e,i=r[n/8|0]>>(7&n)&1),E(e,t),E(t,t),C(t,e,i)}function N(t,e){var r=[P(),P(),P(),P()];L(r[0],y),L(r[1],v),L(r[2],p),K(r[3],y,v),R(t,r,e)}function L(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function x(t){var e,r,i=1;for(e=0;e<16;++e)r=t[e]+i+65535,i=Math.floor(r/65536),t[e]=r-65536*i;t[0]+=i-1+37*(i-1)}function U(t,e,r){for(var i,n=~(r-1),a=0;a<16;++a)i=n&(t[a]^e[a]),t[a]^=i,e[a]^=i}function P(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;++e)r[e]=t[e];return r}function D(t,e,r){for(var i=0;i<16;++i)t[i]=e[i]+r[i]}function O(t,e,r){for(var i=0;i<16;++i)t[i]=e[i]-r[i]}function j(t,e){K(t,e,e)}function K(t,e,r){var i,n,a=0,s=0,o=0,h=0,u=0,f=0,l=0,c=0,d=0,p=0,m=0,g=0,y=0,v=0,b=0,w=0,M=0,_=0,S=0,E=0,C=0,A=0,T=0,B=0,I=0,k=0,R=0,N=0,L=0,x=0,U=0,P=r[0],D=r[1],O=r[2],j=r[3],K=r[4],q=r[5],V=r[6],F=r[7],z=r[8],H=r[9],G=r[10],Z=r[11],W=r[12],Q=r[13],Y=r[14],X=r[15];a+=(i=e[0])*P,s+=i*D,o+=i*O,h+=i*j,u+=i*K,f+=i*q,l+=i*V,c+=i*F,d+=i*z,p+=i*H,m+=i*G,g+=i*Z,y+=i*W,v+=i*Q,b+=i*Y,w+=i*X,s+=(i=e[1])*P,o+=i*D,h+=i*O,u+=i*j,f+=i*K,l+=i*q,c+=i*V,d+=i*F,p+=i*z,m+=i*H,g+=i*G,y+=i*Z,v+=i*W,b+=i*Q,w+=i*Y,M+=i*X,o+=(i=e[2])*P,h+=i*D,u+=i*O,f+=i*j,l+=i*K,c+=i*q,d+=i*V,p+=i*F,m+=i*z,g+=i*H,y+=i*G,v+=i*Z,b+=i*W,w+=i*Q,M+=i*Y,_+=i*X,h+=(i=e[3])*P,u+=i*D,f+=i*O,l+=i*j,c+=i*K,d+=i*q,p+=i*V,m+=i*F,g+=i*z,y+=i*H,v+=i*G,b+=i*Z,w+=i*W,M+=i*Q,_+=i*Y,S+=i*X,u+=(i=e[4])*P,f+=i*D,l+=i*O,c+=i*j,d+=i*K,p+=i*q,m+=i*V,g+=i*F,y+=i*z,v+=i*H,b+=i*G,w+=i*Z,M+=i*W,_+=i*Q,S+=i*Y,E+=i*X,f+=(i=e[5])*P,l+=i*D,c+=i*O,d+=i*j,p+=i*K,m+=i*q,g+=i*V,y+=i*F,v+=i*z,b+=i*H,w+=i*G,M+=i*Z,_+=i*W,S+=i*Q,E+=i*Y,C+=i*X,l+=(i=e[6])*P,c+=i*D,d+=i*O,p+=i*j,m+=i*K,g+=i*q,y+=i*V,v+=i*F,b+=i*z,w+=i*H,M+=i*G,_+=i*Z,S+=i*W,E+=i*Q,C+=i*Y,A+=i*X,c+=(i=e[7])*P,d+=i*D,p+=i*O,m+=i*j,g+=i*K,y+=i*q,v+=i*V,b+=i*F,w+=i*z,M+=i*H,_+=i*G,S+=i*Z,E+=i*W,C+=i*Q,A+=i*Y,T+=i*X,d+=(i=e[8])*P,p+=i*D,m+=i*O,g+=i*j,y+=i*K,v+=i*q,b+=i*V,w+=i*F,M+=i*z,_+=i*H,S+=i*G,E+=i*Z,C+=i*W,A+=i*Q,T+=i*Y,B+=i*X,p+=(i=e[9])*P,m+=i*D,g+=i*O,y+=i*j,v+=i*K,b+=i*q,w+=i*V,M+=i*F,_+=i*z,S+=i*H,E+=i*G,C+=i*Z,A+=i*W,T+=i*Q,B+=i*Y,I+=i*X,m+=(i=e[10])*P,g+=i*D,y+=i*O,v+=i*j,b+=i*K,w+=i*q,M+=i*V,_+=i*F,S+=i*z,E+=i*H,C+=i*G,A+=i*Z,T+=i*W,B+=i*Q,I+=i*Y,k+=i*X,g+=(i=e[11])*P,y+=i*D,v+=i*O,b+=i*j,w+=i*K,M+=i*q,_+=i*V,S+=i*F,E+=i*z,C+=i*H,A+=i*G,T+=i*Z,B+=i*W,I+=i*Q,k+=i*Y,R+=i*X,y+=(i=e[12])*P,v+=i*D,b+=i*O,w+=i*j,M+=i*K,_+=i*q,S+=i*V,E+=i*F,C+=i*z,A+=i*H,T+=i*G,B+=i*Z,I+=i*W,k+=i*Q,R+=i*Y,N+=i*X,v+=(i=e[13])*P,b+=i*D,w+=i*O,M+=i*j,_+=i*K,S+=i*q,E+=i*V,C+=i*F,A+=i*z,T+=i*H,B+=i*G,I+=i*Z,k+=i*W,R+=i*Q,N+=i*Y,L+=i*X,b+=(i=e[14])*P,w+=i*D,M+=i*O,_+=i*j,S+=i*K,E+=i*q,C+=i*V,A+=i*F,T+=i*z,B+=i*H,I+=i*G,k+=i*Z,R+=i*W,N+=i*Q,L+=i*Y,x+=i*X,w+=(i=e[15])*P,s+=38*(_+=i*O),o+=38*(S+=i*j),h+=38*(E+=i*K),u+=38*(C+=i*q),f+=38*(A+=i*V),l+=38*(T+=i*F),c+=38*(B+=i*z),d+=38*(I+=i*H),p+=38*(k+=i*G),m+=38*(R+=i*Z),g+=38*(N+=i*W),y+=38*(L+=i*Q),v+=38*(x+=i*Y),b+=38*(U+=i*X),a=(i=(a+=38*(M+=i*D))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),s=(i=s+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),v=(i=v+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),a=(i=(a+=n-1+37*(n-1))+(n=1)+65535)-65536*(n=Math.floor(i/65536)),s=(i=s+n+65535)-65536*(n=Math.floor(i/65536)),o=(i=o+n+65535)-65536*(n=Math.floor(i/65536)),h=(i=h+n+65535)-65536*(n=Math.floor(i/65536)),u=(i=u+n+65535)-65536*(n=Math.floor(i/65536)),f=(i=f+n+65535)-65536*(n=Math.floor(i/65536)),l=(i=l+n+65535)-65536*(n=Math.floor(i/65536)),c=(i=c+n+65535)-65536*(n=Math.floor(i/65536)),d=(i=d+n+65535)-65536*(n=Math.floor(i/65536)),p=(i=p+n+65535)-65536*(n=Math.floor(i/65536)),m=(i=m+n+65535)-65536*(n=Math.floor(i/65536)),g=(i=g+n+65535)-65536*(n=Math.floor(i/65536)),y=(i=y+n+65535)-65536*(n=Math.floor(i/65536)),v=(i=v+n+65535)-65536*(n=Math.floor(i/65536)),b=(i=b+n+65535)-65536*(n=Math.floor(i/65536)),w=(i=w+n+65535)-65536*(n=Math.floor(i/65536)),a+=n-1+37*(n-1),t[0]=a,t[1]=s,t[2]=o,t[3]=h,t[4]=u,t[5]=f,t[6]=l,t[7]=c,t[8]=d,t[9]=p,t[10]=m,t[11]=g,t[12]=y,t[13]=v,t[14]=b,t[15]=w}},2951:t=>{"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},2955:(t,e,r)=>{"use strict";var i,n=r(5606);function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(6238),o=Symbol("lastResolve"),h=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function m(t){var e=t[o];if(null!==e){var r=t[d].read();null!==r&&(t[l]=null,t[o]=null,t[h]=null,e(p(r,!1)))}}function g(t){n.nextTick(m,t)}var y=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((a(i={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){n.nextTick((function(){t[u]?r(t[u]):e(p(void 0,!0))}))}));var r,i=this[l];if(i)r=new Promise(function(t,e){return function(r,i){t.then((function(){e[f]?r(p(void 0,!0)):e[c](r,i)}),i)}}(i,this));else{var a=this[d].read();if(null!==a)return Promise.resolve(p(a,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),a(i,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),i),y);t.exports=function(t){var e,r=Object.create(v,(a(e={},d,{value:t,writable:!0}),a(e,o,{value:null,writable:!0}),a(e,h,{value:null,writable:!0}),a(e,u,{value:null,writable:!0}),a(e,f,{value:t._readableState.endEmitted,writable:!0}),a(e,c,{value:function(t,e){var i=r[d].read();i?(r[l]=null,r[o]=null,r[h]=null,t(p(i,!1))):(r[o]=t,r[h]=e)},writable:!0}),e));return r[l]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[h];return null!==e&&(r[l]=null,r[o]=null,r[h]=null,e(t)),void(r[u]=t)}var i=r[o];null!==i&&(r[l]=null,r[o]=null,r[h]=null,i(p(void 0,!0))),r[f]=!0})),t.on("readable",g.bind(null,r)),r}},3053:(t,e,r)=>{var i=r(295),n=r(2861).Buffer,a=r(5122);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return a(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),a=t._cache.length;t._cache=n.concat([t._cache,n.allocUnsafe(16*r)]);for(var o=0;o<r;o++){var h=s(t),u=a+16*o;t._cache.writeUInt32BE(h[0],u+0),t._cache.writeUInt32BE(h[1],u+4),t._cache.writeUInt32BE(h[2],u+8),t._cache.writeUInt32BE(h[3],u+12)}var f=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,f)}},3141:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.I=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=s(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},3209:(t,e,r)=>{"use strict";var i=r(5606),n=65536,a=r(2861).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>n)for(var o=0;o<t;o+=n)s.getRandomValues(r.slice(o,o+n));else s.getRandomValues(r);return"function"==typeof e?i.nextTick((function(){e(null,r)})):r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},3219:t=>{"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},3225:(t,e,r)=>{"use strict";var i=r(5606);void 0===i||!i.version||0===i.version.indexOf("v0.")||0===i.version.indexOf("v1.")&&0!==i.version.indexOf("v1.8.")?t.exports={nextTick:function(t,e,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,s,o=arguments.length;switch(o){case 0:case 1:return i.nextTick(t);case 2:return i.nextTick((function(){t.call(null,e)}));case 3:return i.nextTick((function(){t.call(null,e,r)}));case 4:return i.nextTick((function(){t.call(null,e,r,n)}));default:for(a=new Array(o-1),s=0;s<a.length;)a[s++]=arguments[s];return i.nextTick((function(){t.apply(null,a)}))}}}:t.exports=i},3241:t=>{"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},3254:(t,e,r)=>{var i=r(8287).Buffer,n=r(276);r(1696),r(8106),r(7619);var a,s=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(a=r(310)),t.exports=n.pbkdf2=s.pbkdf2=function(t,e,r,s,o,h){if("function"==typeof o&&(h=o,o=null),n.util.isNodejs&&!n.options.usePureJavaScript&&a.pbkdf2&&(null===o||"object"!=typeof o)&&(a.pbkdf2Sync.length>4||!o||"sha1"===o))return"string"!=typeof o&&(o="sha1"),t=i.from(t,"binary"),e=i.from(e,"binary"),h?4===a.pbkdf2Sync.length?a.pbkdf2(t,e,r,s,(function(t,e){if(t)return h(t);h(null,e.toString("binary"))})):a.pbkdf2(t,e,r,s,o,(function(t,e){if(t)return h(t);h(null,e.toString("binary"))})):4===a.pbkdf2Sync.length?a.pbkdf2Sync(t,e,r,s).toString("binary"):a.pbkdf2Sync(t,e,r,s,o).toString("binary");if(null==o&&(o="sha1"),"string"==typeof o){if(!(o in n.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=n.md[o].create()}var u=o.digestLength;if(s>4294967295*u){var f=new Error("Derived key is too long.");if(h)return h(f);throw f}var l=Math.ceil(s/u),c=s-(l-1)*u,d=n.hmac.create();d.start(o,t);var p,m,g,y="";if(!h){for(var v=1;v<=l;++v){d.start(null,null),d.update(e),d.update(n.util.int32ToBytes(v)),p=g=d.digest().getBytes();for(var b=2;b<=r;++b)d.start(null,null),d.update(g),m=d.digest().getBytes(),p=n.util.xorBytes(p,m,u),g=m;y+=v<l?p:p.substr(0,c)}return y}function w(){if(v>l)return h(null,y);d.start(null,null),d.update(e),d.update(n.util.int32ToBytes(v)),p=g=d.digest().getBytes(),b=2,M()}function M(){if(b<=r)return d.start(null,null),d.update(g),m=d.digest().getBytes(),p=n.util.xorBytes(p,m,u),g=m,++b,n.util.setImmediate(M);y+=v<l?p:p.substr(0,c),++v,w()}v=1,w()}},3349:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},3382:(t,e,r)=>{var i=r(2861).Buffer;t.exports=function(t,e,r){if(i.isBuffer(t))return t;if("string"==typeof t)return i.from(t,e);if(ArrayBuffer.isView(t))return i.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},3389:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698),a={};function s(t){i.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}n(e,t);for(var r=Object.keys(a),i=0;i<r.length;i++){var s=r[i];e.prototype[s]=a[s]}return e.create=function(t){return new e(t)},e},a._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},a._update=function(t,e,r,i){var n=this._cbcState,a=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var o=0;o<this.blockSize;o++)s[o]^=t[e+o];for(a._update.call(this,s,0,r,i),o=0;o<this.blockSize;o++)s[o]=r[i+o]}else{for(a._update.call(this,t,e,r,i),o=0;o<this.blockSize;o++)r[i+o]^=s[o];for(o=0;o<this.blockSize;o++)s[o]=t[e+o]}}},3432:(t,e,r)=>{var i=r(276);r(7619),r(9356),r(3736),t.exports=i.kem=i.kem||{};var n=i.jsbn.BigInteger;function a(t,e,r,n){t.generate=function(t,a){for(var s=new i.util.ByteBuffer,o=Math.ceil(a/n)+r,h=new i.util.ByteBuffer,u=r;u<o;++u){h.putInt32(u),e.start(),e.update(t+h.getBytes());var f=e.digest();s.putBytes(f.getBytes(n))}return s.truncate(s.length()-a),s.getBytes()}}i.kem.rsa={},i.kem.rsa.create=function(t,e){var r=(e=e||{}).prng||i.random;return{encrypt:function(e,a){var s,o=Math.ceil(e.n.bitLength()/8);do{s=new n(i.util.bytesToHex(r.getBytesSync(o)),16).mod(e.n)}while(s.compareTo(n.ONE)<=0);var h=o-(s=i.util.hexToBytes(s.toString(16))).length;return h>0&&(s=i.util.fillString(String.fromCharCode(0),h)+s),{encapsulation:e.encrypt(s,"NONE"),key:t.generate(s,a)}},decrypt:function(e,r,i){var n=e.decrypt(r,"NONE");return t.generate(n,i)}}},i.kem.kdf1=function(t,e){a(this,t,0,e||t.digestLength)},i.kem.kdf2=function(t,e){a(this,t,1,e||t.digestLength)}},3507:(t,e,r)=>{"use strict";var i=r(6698),n=r(1800),a=r(6168),s=r(2861).Buffer,o=r(320),h=r(6011),u=r(2802),f=s.alloc(128);function l(t,e){a.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>r?e=("rmd160"===t?new h:u(t)).update(e).digest():e.length<r&&(e=s.concat([e,f],r));for(var i=this._ipad=s.allocUnsafe(r),n=this._opad=s.allocUnsafe(r),o=0;o<r;o++)i[o]=54^e[o],n[o]=92^e[o];this._hash="rmd160"===t?new h:u(t),this._hash.update(i)}i(l,a),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new h:u(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new n(o,e):new l(t,e)}},3600:(t,e,r)=>{"use strict";t.exports=n;var i=r(4610);function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}r(6698)(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},3736:(t,e,r)=>{var i,n=r(276);function a(t,e,r){this.data=[],null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function s(){return new a(null)}function o(t,e,r,i,n,a){for(var s=16383&e,o=e>>14;--a>=0;){var h=16383&this.data[t],u=this.data[t++]>>14,f=o*h+u*s;n=((h=s*h+((16383&f)<<14)+r.data[i]+n)>>28)+(f>>14)+o*u,r.data[i++]=268435455&h}return n}t.exports=n.jsbn=n.jsbn||{},n.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=o,i=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(t,e,r,i,n,a){for(var s=32767&e,o=e>>15;--a>=0;){var h=32767&this.data[t],u=this.data[t++]>>15,f=o*h+u*s;n=((h=s*h+((32767&f)<<15)+r.data[i]+(1073741823&n))>>>30)+(f>>>15)+o*u+(n>>>30),r.data[i++]=1073741823&h}return n},i=30):"Netscape"!=navigator.appName?(a.prototype.am=function(t,e,r,i,n,a){for(;--a>=0;){var s=e*this.data[t++]+r.data[i]+n;n=Math.floor(s/67108864),r.data[i++]=67108863&s}return n},i=26):(a.prototype.am=o,i=28),a.prototype.DB=i,a.prototype.DM=(1<<i)-1,a.prototype.DV=1<<i,a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-i,a.prototype.F2=2*i-52;var h,u,f=new Array;for(h="0".charCodeAt(0),u=0;u<=9;++u)f[h++]=u;for(h="a".charCodeAt(0),u=10;u<36;++u)f[h++]=u;for(h="A".charCodeAt(0),u=10;u<36;++u)f[h++]=u;function l(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function c(t,e){var r=f[t.charCodeAt(e)];return null==r?-1:r}function d(t){var e=s();return e.fromInt(t),e}function p(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function m(t){this.m=t}function g(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function y(t,e){return t&e}function v(t,e){return t|e}function b(t,e){return t^e}function w(t,e){return t&~e}function M(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function _(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function S(){}function E(t){return t}function C(t){this.r2=s(),this.q3=s(),a.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}m.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},m.prototype.revert=function(t){return t},m.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},m.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},m.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},g.prototype.convert=function(t){var e=s();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(a.ZERO)>0&&this.m.subTo(e,e),e},g.prototype.revert=function(t){var e=s();return t.copyTo(e),this.reduce(e),e},g.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t.data[e],i=r*this.mpl+((r*this.mph+(t.data[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,i,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},g.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},a.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},a.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},a.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,n=!1,s=0;--i>=0;){var o=8==r?255&t[i]:c(t,i);o<0?"-"==t.charAt(i)&&(n=!0):(n=!1,0==s?this.data[this.t++]=o:s+r>this.DB?(this.data[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this.data[this.t++]=o>>this.DB-s):this.data[this.t-1]|=o<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&128&t[0]&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),n&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this.data[this.t-1]==t;)--this.t},a.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s},a.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e.data[r-t]=this.data[r];e.t=Math.max(this.t-t,0),e.s=this.s},a.prototype.lShiftTo=function(t,e){var r,i=t%this.DB,n=this.DB-i,a=(1<<n)-1,s=Math.floor(t/this.DB),o=this.s<<i&this.DM;for(r=this.t-1;r>=0;--r)e.data[r+s+1]=this.data[r]>>n|o,o=(this.data[r]&a)<<i;for(r=s-1;r>=0;--r)e.data[r]=0;e.data[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},a.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,a=(1<<i)-1;e.data[0]=this.data[r]>>i;for(var s=r+1;s<this.t;++s)e.data[s-r-1]|=(this.data[s]&a)<<n,e.data[s-r]=this.data[s]>>i;i>0&&(e.data[this.t-r-1]|=(this.s&a)<<n),e.t=this.t-r,e.clamp()}},a.prototype.subTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this.data[r]-t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e.data[r++]=this.DV+i:i>0&&(e.data[r++]=i),e.t=r,e.clamp()},a.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),n=r.t;for(e.t=n+i.t;--n>=0;)e.data[n]=0;for(n=0;n<i.t;++n)e.data[n+r.t]=r.am(0,i.data[n],e,n,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&a.ZERO.subTo(e,e)},a.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t.data[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e.data[r],t,2*r,0,1);(t.data[r+e.t]+=e.am(r+1,2*e.data[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()},a.prototype.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var n=this.abs();if(n.t<i.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=s());var o=s(),h=this.s,u=t.s,f=this.DB-p(i.data[i.t-1]);f>0?(i.lShiftTo(f,o),n.lShiftTo(f,r)):(i.copyTo(o),n.copyTo(r));var l=o.t,c=o.data[l-1];if(0!=c){var d=c*(1<<this.F1)+(l>1?o.data[l-2]>>this.F2:0),m=this.FV/d,g=(1<<this.F1)/d,y=1<<this.F2,v=r.t,b=v-l,w=null==e?s():e;for(o.dlShiftTo(b,w),r.compareTo(w)>=0&&(r.data[r.t++]=1,r.subTo(w,r)),a.ONE.dlShiftTo(l,w),w.subTo(o,o);o.t<l;)o.data[o.t++]=0;for(;--b>=0;){var M=r.data[--v]==c?this.DM:Math.floor(r.data[v]*m+(r.data[v-1]+y)*g);if((r.data[v]+=o.am(0,M,r,b,0,l))<M)for(o.dlShiftTo(b,w),r.subTo(w,r);r.data[v]<--M;)r.subTo(w,r)}null!=e&&(r.drShiftTo(l,e),h!=u&&a.ZERO.subTo(e,e)),r.t=l,r.clamp(),f>0&&r.rShiftTo(f,r),h<0&&a.ZERO.subTo(r,r)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(t,e){if(t>4294967295||t<1)return a.ONE;var r=s(),i=s(),n=e.convert(this),o=p(t)-1;for(n.copyTo(r);--o>=0;)if(e.sqrTo(r,i),(t&1<<o)>0)e.mulTo(i,n,r);else{var h=r;r=i,i=h}return e.revert(r)},a.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,n=!1,a="",s=this.t,o=this.DB-s*this.DB%e;if(s-- >0)for(o<this.DB&&(r=this.data[s]>>o)>0&&(n=!0,a=l(r));s>=0;)o<e?(r=(this.data[s]&(1<<o)-1)<<e-o,r|=this.data[--s]>>(o+=this.DB-e)):(r=this.data[s]>>(o-=e)&i,o<=0&&(o+=this.DB,--s)),r>0&&(n=!0),n&&(a+=l(r));return n?a:"0"},a.prototype.negate=function(){var t=s();return a.ZERO.subTo(this,t),t},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this.data[r]-t.data[r]))return e;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(a.ZERO)>0&&t.subTo(e,e),e},a.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new m(e):new g(e),this.exp(t,r)},a.ZERO=d(0),a.ONE=d(1),S.prototype.convert=E,S.prototype.revert=E,S.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},S.prototype.sqrTo=function(t,e){t.squareTo(e)},C.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e},C.prototype.revert=function(t){return t},C.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},C.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},C.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var A=[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],T=(1<<26)/A[A.length-1];a.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},a.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=d(r),n=s(),a=s(),o="";for(this.divRemTo(i,n,a);n.signum()>0;)o=(r+a.intValue()).toString(t).substr(1)+o,n.divRemTo(i,n,a);return a.intValue().toString(t)+o},a.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),n=!1,s=0,o=0,h=0;h<t.length;++h){var u=c(t,h);u<0?"-"==t.charAt(h)&&0==this.signum()&&(n=!0):(o=e*o+u,++s>=r&&(this.dMultiply(i),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(o,0)),n&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(a.ONE.shiftLeft(t-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(a.ONE.shiftLeft(t-1),this);else{var i=new Array,n=7&t;i.length=1+(t>>3),e.nextBytes(i),n>0?i[0]&=(1<<n)-1:i[0]=0,this.fromString(i,256)}},a.prototype.bitwiseTo=function(t,e,r){var i,n,a=Math.min(t.t,this.t);for(i=0;i<a;++i)r.data[i]=e(this.data[i],t.data[i]);if(t.t<this.t){for(n=t.s&this.DM,i=a;i<this.t;++i)r.data[i]=e(this.data[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=a;i<t.t;++i)r.data[i]=e(n,t.data[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},a.prototype.changeBit=function(t,e){var r=a.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},a.prototype.addTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this.data[r]+t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t.data[r],e.data[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e.data[r++]=i:i<-1&&(e.data[r++]=this.DV+i),e.t=r,e.clamp()},a.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},a.prototype.multiplyLowerTo=function(t,e,r){var i,n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;for(i=r.t-this.t;n<i;++n)r.data[n+this.t]=this.am(0,t.data[n],r,n,0,this.t);for(i=Math.min(t.t,e);n<i;++n)this.am(0,t.data[n],r,n,0,e-n);r.clamp()},a.prototype.multiplyUpperTo=function(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r.data[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r.data[this.t+i-e]=this.am(e-i,t.data[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)},a.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this.data[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this.data[i])%t;return r},a.prototype.millerRabin=function(t){var e=this.subtract(a.ONE),r=e.getLowestSetBit();if(r<=0)return!1;for(var i,n=e.shiftRight(r),s={nextBytes:function(t){for(var e=0;e<t.length;++e)t[e]=Math.floor(256*Math.random())}},o=0;o<t;++o){do{i=new a(this.bitLength(),s)}while(i.compareTo(a.ONE)<=0||i.compareTo(e)>=0);var h=i.modPow(n,this);if(0!=h.compareTo(a.ONE)&&0!=h.compareTo(e)){for(var u=1;u++<r&&0!=h.compareTo(e);)if(0==(h=h.modPowInt(2,this)).compareTo(a.ONE))return!1;if(0!=h.compareTo(e))return!1}}return!0},a.prototype.clone=function(){var t=s();return this.copyTo(t),t},a.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},a.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i<this.DB&&(r=this.data[t]>>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<<this.DB-i);t>=0;)i<8?(r=(this.data[t]&(1<<i)-1)<<8-i,r|=this.data[--t]>>(i+=this.DB-8)):(r=this.data[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),128&r&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},a.prototype.equals=function(t){return 0==this.compareTo(t)},a.prototype.min=function(t){return this.compareTo(t)<0?this:t},a.prototype.max=function(t){return this.compareTo(t)>0?this:t},a.prototype.and=function(t){var e=s();return this.bitwiseTo(t,y,e),e},a.prototype.or=function(t){var e=s();return this.bitwiseTo(t,v,e),e},a.prototype.xor=function(t){var e=s();return this.bitwiseTo(t,b,e),e},a.prototype.andNot=function(t){var e=s();return this.bitwiseTo(t,w,e),e},a.prototype.not=function(){for(var t=s(),e=0;e<this.t;++e)t.data[e]=this.DM&~this.data[e];return t.t=this.t,t.s=~this.s,t},a.prototype.shiftLeft=function(t){var e=s();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},a.prototype.shiftRight=function(t){var e=s();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},a.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this.data[t])return t*this.DB+M(this.data[t]);return this.s<0?this.t*this.DB:-1},a.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=_(this.data[r]^e);return t},a.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this.data[e]&1<<t%this.DB)},a.prototype.setBit=function(t){return this.changeBit(t,v)},a.prototype.clearBit=function(t){return this.changeBit(t,w)},a.prototype.flipBit=function(t){return this.changeBit(t,b)},a.prototype.add=function(t){var e=s();return this.addTo(t,e),e},a.prototype.subtract=function(t){var e=s();return this.subTo(t,e),e},a.prototype.multiply=function(t){var e=s();return this.multiplyTo(t,e),e},a.prototype.divide=function(t){var e=s();return this.divRemTo(t,e,null),e},a.prototype.remainder=function(t){var e=s();return this.divRemTo(t,null,e),e},a.prototype.divideAndRemainder=function(t){var e=s(),r=s();return this.divRemTo(t,e,r),new Array(e,r)},a.prototype.modPow=function(t,e){var r,i,n=t.bitLength(),a=d(1);if(n<=0)return a;r=n<18?1:n<48?3:n<144?4:n<768?5:6,i=n<8?new m(e):e.isEven()?new C(e):new g(e);var o=new Array,h=3,u=r-1,f=(1<<r)-1;if(o[1]=i.convert(this),r>1){var l=s();for(i.sqrTo(o[1],l);h<=f;)o[h]=s(),i.mulTo(l,o[h-2],o[h]),h+=2}var c,y,v=t.t-1,b=!0,w=s();for(n=p(t.data[v])-1;v>=0;){for(n>=u?c=t.data[v]>>n-u&f:(c=(t.data[v]&(1<<n+1)-1)<<u-n,v>0&&(c|=t.data[v-1]>>this.DB+n-u)),h=r;!(1&c);)c>>=1,--h;if((n-=h)<0&&(n+=this.DB,--v),b)o[c].copyTo(a),b=!1;else{for(;h>1;)i.sqrTo(a,w),i.sqrTo(w,a),h-=2;h>0?i.sqrTo(a,w):(y=a,a=w,w=y),i.mulTo(w,o[c],a)}for(;v>=0&&!(t.data[v]&1<<n);)i.sqrTo(a,w),y=a,a=w,w=y,--n<0&&(n=this.DB-1,--v)}return i.revert(a)},a.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return a.ZERO;for(var r=t.clone(),i=this.clone(),n=d(1),s=d(0),o=d(0),h=d(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(n.isEven()&&s.isEven()||(n.addTo(this,n),s.subTo(t,s)),n.rShiftTo(1,n)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(o.isEven()&&h.isEven()||(o.addTo(this,o),h.subTo(t,h)),o.rShiftTo(1,o)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);r.compareTo(i)>=0?(r.subTo(i,r),e&&n.subTo(o,n),s.subTo(h,s)):(i.subTo(r,i),e&&o.subTo(n,o),h.subTo(s,h))}return 0!=i.compareTo(a.ONE)?a.ZERO:h.compareTo(t)>=0?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},a.prototype.pow=function(t){return this.exp(t,new S)},a.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return e;for(n<a&&(a=n),a>0&&(e.rShiftTo(a,e),r.rShiftTo(a,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},a.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r.data[0]<=A[A.length-1]){for(e=0;e<A.length;++e)if(r.data[0]==A[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<A.length;){for(var i=A[e],n=e+1;n<A.length&&i<T;)i*=A[n++];for(i=r.modInt(i);e<n;)if(i%A[e++]==0)return!1}return r.millerRabin(t)}},3737:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,h=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=(e=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=u(i)+l(p,n,a,o)+h+r[d]+s[p]|0;h=o,o=a,a=f(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},3766:()=>{},3776:()=>{},3832:(t,e,r)=>{var i,n,a=r(2861).Buffer,s=r(4196),o=r(2455),h=r(1352),u=r(3382),f=r.g.crypto&&r.g.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},c=[];function d(){return n||(n=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(t,e,r,i,n){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},t,i<<3)})).then((function(t){return a.from(t)}))}t.exports=function(t,e,n,m,g,y){"function"==typeof g&&(y=g,g=void 0);var v=l[(g=g||"sha1").toLowerCase()];if(v&&"function"==typeof r.g.Promise){if(s(n,m),t=u(t,o,"Password"),e=u(e,o,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){d()((function(){e(null,t)}))}),(function(t){d()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==c[t])return c[t];var e=p(i=i||a.alloc(8),i,10,128,t).then((function(){return!0})).catch((function(){return!1}));return c[t]=e,e}(v).then((function(r){return r?p(t,e,n,m,v):h(t,e,n,m,g)})),y)}else d()((function(){var r;try{r=h(t,e,n,m,g)}catch(t){return y(t)}y(null,r)}))}},3878:(t,e,r)=>{var i=r(5606),n=r(276);r(7619);var a=null;!n.util.isNodejs||n.options.usePureJavaScript||i.versions["node-webkit"]||(a=r(310)),(t.exports=n.prng=n.prng||{}).create=function(t){for(var e={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=t.md,i=new Array(32),s=0;s<32;++s)i[s]=r.create();function o(){if(e.pools[0].messageLength>=32)return h();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),h()}function h(){e.reseeds=4294967295===e.reseeds?0:e.reseeds+1;var t=e.plugin.md.create();t.update(e.keyBytes);for(var r=1,i=0;i<32;++i)e.reseeds%r==0&&(t.update(e.pools[i].digest().getBytes()),e.pools[i].start()),r<<=1;e.keyBytes=t.digest().getBytes(),t.start(),t.update(e.keyBytes);var n=t.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(n),e.generated=0}function u(t){var e=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(e=function(t){return i.getRandomValues(t)});var a=n.util.createBuffer();if(e)for(;a.length()<t;){var s=Math.max(1,Math.min(t-a.length(),65536)/4),o=new Uint32Array(Math.floor(s));try{e(o);for(var h=0;h<o.length;++h)a.putInt32(o[h])}catch(t){if(!("undefined"!=typeof QuotaExceededError&&t instanceof QuotaExceededError))throw t}}if(a.length()<t)for(var u,f,l,c=Math.floor(65536*Math.random());a.length()<t;)for(f=16807*(65535&c),f+=(32767&(u=16807*(c>>16)))<<16,c=4294967295&(f=(2147483647&(f+=u>>15))+(f>>31)),h=0;h<3;++h)l=c>>>(h<<3),l^=Math.floor(256*Math.random()),a.putByte(255&l);return a.getBytes(t)}return e.pools=i,e.pool=0,e.generate=function(t,r){if(!r)return e.generateSync(t);var i=e.plugin.cipher,a=e.plugin.increment,s=e.plugin.formatKey,o=e.plugin.formatSeed,u=n.util.createBuffer();e.key=null,function f(l){if(l)return r(l);if(u.length()>=t)return r(null,u.getBytes(t));if(e.generated>1048575&&(e.key=null),null===e.key)return n.util.nextTick((function(){!function(t){if(e.pools[0].messageLength>=32)return h(),t();var r=32-e.pools[0].messageLength<<5;e.seedFile(r,(function(r,i){if(r)return t(r);e.collect(i),h(),t()}))}(f)}));var c=i(e.key,e.seed);e.generated+=c.length,u.putBytes(c),e.key=s(i(e.key,a(e.seed))),e.seed=o(i(e.key,e.seed)),n.util.setImmediate(f)}()},e.generateSync=function(t){var r=e.plugin.cipher,i=e.plugin.increment,a=e.plugin.formatKey,s=e.plugin.formatSeed;e.key=null;for(var h=n.util.createBuffer();h.length()<t;){e.generated>1048575&&(e.key=null),null===e.key&&o();var u=r(e.key,e.seed);e.generated+=u.length,h.putBytes(u),e.key=a(r(e.key,i(e.seed))),e.seed=s(r(e.key,e.seed))}return h.getBytes(t)},a?(e.seedFile=function(t,e){a.randomBytes(t,(function(t,r){if(t)return e(t);e(null,r.toString())}))},e.seedFileSync=function(t){return a.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,u(t))}catch(t){e(t)}},e.seedFileSync=u),e.collect=function(t){for(var r=t.length,i=0;i<r;++i)e.pools[e.pool].update(t.substr(i,1)),e.pool=31===e.pool?0:e.pool+1},e.collectInt=function(t,r){for(var i="",n=0;n<r;n+=8)i+=String.fromCharCode(t>>n&255);e.collect(i)},e.registerWorker=function(t){t===self?e.seedFile=function(t,e){self.addEventListener("message",(function t(r){var i=r.data;i.forge&&i.forge.prng&&(self.removeEventListener("message",t),e(i.forge.prng.err,i.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:t}}})}:t.addEventListener("message",(function(r){var i=r.data;i.forge&&i.forge.prng&&e.seedFile(i.forge.prng.needed,(function(e,r){t.postMessage({forge:{prng:{err:e,bytes:r}}})}))}))},e}},3900:(t,e,r)=>{var i=r(276);r(7619),t.exports=i.cipher=i.cipher||{},i.cipher.algorithms=i.cipher.algorithms||{},i.cipher.createCipher=function(t,e){var r=t;if("string"==typeof r&&(r=i.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new i.cipher.BlockCipher({algorithm:r,key:e,decrypt:!1})},i.cipher.createDecipher=function(t,e){var r=t;if("string"==typeof r&&(r=i.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+t);return new i.cipher.BlockCipher({algorithm:r,key:e,decrypt:!0})},i.cipher.registerAlgorithm=function(t,e){t=t.toUpperCase(),i.cipher.algorithms[t]=e},i.cipher.getAlgorithm=function(t){return(t=t.toUpperCase())in i.cipher.algorithms?i.cipher.algorithms[t]:null};var n=i.cipher.BlockCipher=function(t){this.algorithm=t.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=t.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=t.decrypt,this.algorithm.initialize(t)};n.prototype.start=function(t){t=t||{};var e={};for(var r in t)e[r]=t[r];e.decrypt=this._decrypt,this._finish=!1,this._input=i.util.createBuffer(),this.output=t.output||i.util.createBuffer(),this.mode.start(e)},n.prototype.update=function(t){for(t&&this._input.putBuffer(t);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},n.prototype.finish=function(t){!t||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(e){return t(this.blockSize,e,!1)},this.mode.unpad=function(e){return t(this.blockSize,e,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e)))}},3917:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=r(6225),s=i.rotl32,o=i.sum32,h=i.sum32_5,u=a.ft_1,f=n.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function c(){if(!(this instanceof c))return new c;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(c,f),t.exports=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],a=this.h[1],f=this.h[2],c=this.h[3],d=this.h[4];for(i=0;i<r.length;i++){var p=~~(i/20),m=h(s(n,5),u(p,a,f,c),d,r[i],l[p]);d=c,c=f,f=s(a,30),a=n,n=m}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],f),this.h[3]=o(this.h[3],c),this.h[4]=o(this.h[4],d)},c.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},3986:(t,e,r)=>{var i=r(276);r(2746),r(1696),r(1267),r(2385),r(9255),r(9356),r(1598),r(7619);var n=function(t,e,r,n){var a=i.util.createBuffer(),s=t.length>>1,o=s+(1&t.length),h=t.substr(0,o),u=t.substr(s,o),f=i.util.createBuffer(),l=i.hmac.create();r=e+r;var c=Math.ceil(n/16),d=Math.ceil(n/20);l.start("MD5",h);var p=i.util.createBuffer();f.putBytes(r);for(var m=0;m<c;++m)l.start(null,null),l.update(f.getBytes()),f.putBuffer(l.digest()),l.start(null,null),l.update(f.bytes()+r),p.putBuffer(l.digest());l.start("SHA1",u);var g=i.util.createBuffer();for(f.clear(),f.putBytes(r),m=0;m<d;++m)l.start(null,null),l.update(f.getBytes()),f.putBuffer(l.digest()),l.start(null,null),l.update(f.bytes()+r),g.putBuffer(l.digest());return a.putBytes(i.util.xorBytes(p.getBytes(),g.getBytes(),n)),a},a=function(t,e,r){var n=!1;try{var a=t.deflate(e.fragment.getBytes());e.fragment=i.util.createBuffer(a),e.length=a.length,n=!0}catch(t){}return n},s=function(t,e,r){var n=!1;try{var a=t.inflate(e.fragment.getBytes());e.fragment=i.util.createBuffer(a),e.length=a.length,n=!0}catch(t){}return n},o=function(t,e){var r=0;switch(e){case 1:r=t.getByte();break;case 2:r=t.getInt16();break;case 3:r=t.getInt24();break;case 4:r=t.getInt32()}return i.util.createBuffer(t.getBytes(r))},h=function(t,e,r){t.putInt(r.length(),e<<3),t.putBuffer(r)},u={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}}};u.SupportedVersions=[u.Versions.TLS_1_1,u.Versions.TLS_1_0],u.Version=u.SupportedVersions[0],u.MaxFragment=15360,u.ConnectionEnd={server:0,client:1},u.PRFAlgorithm={tls_prf_sha256:0},u.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},u.CipherType={stream:0,block:1,aead:2},u.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},u.CompressionMethod={none:0,deflate:1},u.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},u.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},u.Alert={},u.Alert.Level={warning:1,fatal:2},u.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},u.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},u.CipherSuites={},u.getCipherSuite=function(t){var e=null;for(var r in u.CipherSuites){var i=u.CipherSuites[r];if(i.id[0]===t.charCodeAt(0)&&i.id[1]===t.charCodeAt(1)){e=i;break}}return e},u.handleUnexpected=function(t,e){!t.open&&t.entity===u.ConnectionEnd.client||t.error(t,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unexpected_message}})},u.handleHelloRequest=function(t,e,r){!t.handshaking&&t.handshakes>0&&(u.queue(t,u.createAlert(t,{level:u.Alert.Level.warning,description:u.Alert.Description.no_renegotiation})),u.flush(t)),t.process()},u.parseHelloMessage=function(t,e,r){var n=null,a=t.entity===u.ConnectionEnd.client;if(r<38)t.error(t,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});else{var s=e.fragment,h=s.length();if(n={version:{major:s.getByte(),minor:s.getByte()},random:i.util.createBuffer(s.getBytes(32)),session_id:o(s,1),extensions:[]},a?(n.cipher_suite=s.getBytes(2),n.compression_method=s.getByte()):(n.cipher_suites=o(s,2),n.compression_methods=o(s,1)),(h=r-(h-s.length()))>0){for(var f=o(s,2);f.length()>0;)n.extensions.push({type:[f.getByte(),f.getByte()],data:o(f,2)});if(!a)for(var l=0;l<n.extensions.length;++l){var c=n.extensions[l];if(0===c.type[0]&&0===c.type[1])for(var d=o(c.data,2);d.length()>0&&0===d.getByte();)t.session.extensions.server_name.serverNameList.push(o(d,2).getBytes())}}if(t.session.version&&(n.version.major!==t.session.version.major||n.version.minor!==t.session.version.minor))return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});if(a)t.session.cipherSuite=u.getCipherSuite(n.cipher_suite);else for(var p=i.util.createBuffer(n.cipher_suites.bytes());p.length()>0&&(t.session.cipherSuite=u.getCipherSuite(p.getBytes(2)),null===t.session.cipherSuite););if(null===t.session.cipherSuite)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure},cipherSuite:i.util.bytesToHex(n.cipher_suite)});t.session.compressionMethod=a?n.compression_method:u.CompressionMethod.none}return n},u.createSecurityParameters=function(t,e){var r=t.entity===u.ConnectionEnd.client,i=e.random.bytes(),n=r?t.session.sp.client_random:i,a=r?i:u.createRandom().getBytes();t.session.sp={entity:t.entity,prf_algorithm:u.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:t.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:n,server_random:a}},u.handleServerHello=function(t,e,r){var i=u.parseHelloMessage(t,e,r);if(!t.fail){if(!(i.version.minor<=t.version.minor))return t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});t.version.minor=i.version.minor,t.session.version=t.version;var n=i.session_id.bytes();n.length>0&&n===t.session.id?(t.expect=p,t.session.resuming=!0,t.session.sp.server_random=i.random.bytes()):(t.expect=f,t.session.resuming=!1,u.createSecurityParameters(t,i)),t.session.id=n,t.process()}},u.handleClientHello=function(t,e,r){var n=u.parseHelloMessage(t,e,r);if(!t.fail){var a=n.session_id.bytes(),s=null;if(t.sessionCache&&(null===(s=t.sessionCache.getSession(a))?a="":(s.version.major!==n.version.major||s.version.minor>n.version.minor)&&(s=null,a="")),0===a.length&&(a=i.random.getBytes(32)),t.session.id=a,t.session.clientHelloVersion=n.version,t.session.sp={},s)t.version=t.session.version=s.version,t.session.sp=s.sp;else{for(var o,h=1;h<u.SupportedVersions.length&&!((o=u.SupportedVersions[h]).minor<=n.version.minor);++h);t.version={major:o.major,minor:o.minor},t.session.version=t.version}null!==s?(t.expect=M,t.session.resuming=!0,t.session.sp.client_random=n.random.bytes()):(t.expect=!1!==t.verifyClient?v:b,t.session.resuming=!1,u.createSecurityParameters(t,n)),t.open=!0,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createServerHello(t)})),t.session.resuming?(u.queue(t,u.createRecord(t,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),t.state.pending=u.createConnectionState(t),t.state.current.write=t.state.pending.write,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createFinished(t)}))):(u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificate(t)})),t.fail||(u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createServerKeyExchange(t)})),!1!==t.verifyClient&&u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificateRequest(t)})),u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createServerHelloDone(t)})))),u.flush(t),t.process()}},u.handleCertificate=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var n,a,s=e.fragment,h={certificate_list:o(s,3)},f=[];try{for(;h.certificate_list.length()>0;)n=o(h.certificate_list,3),a=i.asn1.fromDer(n),n=i.pki.certificateFromAsn1(a,!0),f.push(n)}catch(e){return t.error(t,{message:"Could not parse certificate list.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var c=t.entity===u.ConnectionEnd.client;!c&&!0!==t.verifyClient||0!==f.length?0===f.length?t.expect=c?l:b:(c?t.session.serverCertificate=f[0]:t.session.clientCertificate=f[0],u.verifyCertificateChain(t,f)&&(t.expect=c?l:b)):t.error(t,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}}),t.process()},u.handleServerKeyExchange=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});t.expect=c,t.process()},u.handleClientKeyExchange=function(t,e,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});var n=e.fragment,a={enc_pre_master_secret:o(n,2).getBytes()},s=null;if(t.getPrivateKey)try{s=t.getPrivateKey(t,t.session.serverCertificate),s=i.pki.privateKeyFromPem(s)}catch(e){t.error(t,{message:"Could not get private key.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}if(null===s)return t.error(t,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}});try{var h=t.session.sp;h.pre_master_secret=s.decrypt(a.enc_pre_master_secret);var f=t.session.clientHelloVersion;if(f.major!==h.pre_master_secret.charCodeAt(0)||f.minor!==h.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(t){h.pre_master_secret=i.random.getBytes(48)}t.expect=M,null!==t.session.clientCertificate&&(t.expect=w),t.process()},u.handleCertificateRequest=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var i=e.fragment,n={certificate_types:o(i,1),certificate_authorities:o(i,2)};t.session.certificateRequest=n,t.expect=d,t.process()},u.handleCertificateVerify=function(t,e,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var a=n.bytes();n.read+=4;var s={signature:o(n,2).getBytes()},h=i.util.createBuffer();h.putBuffer(t.session.md5.digest()),h.putBuffer(t.session.sha1.digest()),h=h.getBytes();try{if(!t.session.clientCertificate.publicKey.verify(h,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(a),t.session.sha1.update(a)}catch(e){return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure}})}t.expect=M,t.process()},u.handleServerHelloDone=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.record_overflow}});if(null===t.serverCertificate){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.insufficient_security}},a=t.verify(t,n.alert.description,0,[]);if(!0!==a)return(a||0===a)&&("object"!=typeof a||i.util.isArray(a)?"number"==typeof a&&(n.alert.description=a):(a.message&&(n.message=a.message),a.alert&&(n.alert.description=a.alert))),t.error(t,n)}null!==t.session.certificateRequest&&(e=u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificate(t)}),u.queue(t,e)),e=u.createRecord(t,{type:u.ContentType.handshake,data:u.createClientKeyExchange(t)}),u.queue(t,e),t.expect=y;var s=function(t,e){null!==t.session.certificateRequest&&null!==t.session.clientCertificate&&u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createCertificateVerify(t,e)})),u.queue(t,u.createRecord(t,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),t.state.pending=u.createConnectionState(t),t.state.current.write=t.state.pending.write,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createFinished(t)})),t.expect=p,u.flush(t),t.process()};if(null===t.session.certificateRequest||null===t.session.clientCertificate)return s(t,null);u.getClientSignature(t,s)},u.handleChangeCipherSpec=function(t,e){if(1!==e.fragment.getByte())return t.error(t,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var r=t.entity===u.ConnectionEnd.client;(t.session.resuming&&r||!t.session.resuming&&!r)&&(t.state.pending=u.createConnectionState(t)),t.state.current.read=t.state.pending.read,(!t.session.resuming&&r||t.session.resuming&&!r)&&(t.state.pending=null),t.expect=r?m:_,t.process()},u.handleFinished=function(t,e,r){var a=e.fragment;a.read-=4;var s=a.bytes();a.read+=4;var o=e.fragment.getBytes();(a=i.util.createBuffer()).putBuffer(t.session.md5.digest()),a.putBuffer(t.session.sha1.digest());var h=t.entity===u.ConnectionEnd.client,f=h?"server finished":"client finished",l=t.session.sp;if((a=n(l.master_secret,f,a.getBytes(),12)).getBytes()!==o)return t.error(t,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decrypt_error}});t.session.md5.update(s),t.session.sha1.update(s),(t.session.resuming&&h||!t.session.resuming&&!h)&&(u.queue(t,u.createRecord(t,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),t.state.current.write=t.state.pending.write,t.state.pending=null,u.queue(t,u.createRecord(t,{type:u.ContentType.handshake,data:u.createFinished(t)}))),t.expect=h?g:S,t.handshaking=!1,++t.handshakes,t.peerCertificate=h?t.session.serverCertificate:t.session.clientCertificate,u.flush(t),t.isConnected=!0,t.connected(t),t.process()},u.handleAlert=function(t,e){var r,i=e.fragment,n={level:i.getByte(),description:i.getByte()};switch(n.description){case u.Alert.Description.close_notify:r="Connection closed.";break;case u.Alert.Description.unexpected_message:r="Unexpected message.";break;case u.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case u.Alert.Description.decryption_failed:r="Decryption failed.";break;case u.Alert.Description.record_overflow:r="Record overflow.";break;case u.Alert.Description.decompression_failure:r="Decompression failed.";break;case u.Alert.Description.handshake_failure:r="Handshake failure.";break;case u.Alert.Description.bad_certificate:r="Bad certificate.";break;case u.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case u.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case u.Alert.Description.certificate_expired:r="Certificate expired.";break;case u.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case u.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case u.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case u.Alert.Description.access_denied:r="Access denied.";break;case u.Alert.Description.decode_error:r="Decode error.";break;case u.Alert.Description.decrypt_error:r="Decrypt error.";break;case u.Alert.Description.export_restriction:r="Export restriction.";break;case u.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case u.Alert.Description.insufficient_security:r="Insufficient security.";break;case u.Alert.Description.internal_error:r="Internal error.";break;case u.Alert.Description.user_canceled:r="User canceled.";break;case u.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(n.description===u.Alert.Description.close_notify)return t.close();t.error(t,{message:r,send:!1,origin:t.entity===u.ConnectionEnd.client?"server":"client",alert:n}),t.process()},u.handleHandshake=function(t,e){var r=e.fragment,n=r.getByte(),a=r.getInt24();if(a>r.length())return t.fragmented=e,e.fragment=i.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var s=r.bytes(a+4);r.read+=4,n in O[t.entity][t.expect]?(t.entity!==u.ConnectionEnd.server||t.open||t.fail||(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:i.md.md5.create(),sha1:i.md.sha1.create()}),n!==u.HandshakeType.hello_request&&n!==u.HandshakeType.certificate_verify&&n!==u.HandshakeType.finished&&(t.session.md5.update(s),t.session.sha1.update(s)),O[t.entity][t.expect][n](t,e,a)):u.handleUnexpected(t,e)},u.handleApplicationData=function(t,e){t.data.putBuffer(e.fragment),t.dataReady(t),t.process()},u.handleHeartbeat=function(t,e){var r=e.fragment,n=r.getByte(),a=r.getInt16(),s=r.getBytes(a);if(n===u.HeartbeatMessageType.heartbeat_request){if(t.handshaking||a>s.length)return t.process();u.queue(t,u.createRecord(t,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_response,s)})),u.flush(t)}else if(n===u.HeartbeatMessageType.heartbeat_response){if(s!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,i.util.createBuffer(s))}t.process()};var f=1,l=2,c=3,d=4,p=5,m=6,g=7,y=8,v=1,b=2,w=3,M=4,_=5,S=6,E=u.handleUnexpected,C=u.handleChangeCipherSpec,A=u.handleAlert,T=u.handleHandshake,B=u.handleApplicationData,I=u.handleHeartbeat,k=[];k[u.ConnectionEnd.client]=[[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[C,A,E,E,I],[E,A,T,E,I],[E,A,T,B,I],[E,A,T,E,I]],k[u.ConnectionEnd.server]=[[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[E,A,T,E,I],[C,A,E,E,I],[E,A,T,E,I],[E,A,T,B,I],[E,A,T,E,I]];var R=u.handleHelloRequest,N=u.handleServerHello,L=u.handleCertificate,x=u.handleServerKeyExchange,U=u.handleCertificateRequest,P=u.handleServerHelloDone,D=u.handleFinished,O=[];O[u.ConnectionEnd.client]=[[E,E,N,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,L,x,U,P,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,x,U,P,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,U,P,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,P,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,D],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[R,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]];var j=u.handleClientHello,K=u.handleClientKeyExchange,q=u.handleCertificateVerify;O[u.ConnectionEnd.server]=[[E,j,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,L,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,K,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,q,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,D],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]],u.generateKeys=function(t,e){var r=n,i=e.client_random+e.server_random;t.session.resuming||(e.master_secret=r(e.pre_master_secret,"master secret",i,48).bytes(),e.pre_master_secret=null),i=e.server_random+e.client_random;var a=2*e.mac_key_length+2*e.enc_key_length,s=t.version.major===u.Versions.TLS_1_0.major&&t.version.minor===u.Versions.TLS_1_0.minor;s&&(a+=2*e.fixed_iv_length);var o=r(e.master_secret,"key expansion",i,a),h={client_write_MAC_key:o.getBytes(e.mac_key_length),server_write_MAC_key:o.getBytes(e.mac_key_length),client_write_key:o.getBytes(e.enc_key_length),server_write_key:o.getBytes(e.enc_key_length)};return s&&(h.client_write_IV=o.getBytes(e.fixed_iv_length),h.server_write_IV=o.getBytes(e.fixed_iv_length)),h},u.createConnectionState=function(t){var e=t.entity===u.ConnectionEnd.client,r=function(){var t={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(t){return!0},compressionState:null,compressFunction:function(t){return!0},updateSequenceNumber:function(){4294967295===t.sequenceNumber[1]?(t.sequenceNumber[1]=0,++t.sequenceNumber[0]):++t.sequenceNumber[1]}};return t},i={read:r(),write:r()};if(i.read.update=function(t,e){return i.read.cipherFunction(e,i.read)?i.read.compressFunction(t,e,i.read)||t.error(t,{message:"Could not decompress record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decompression_failure}}):t.error(t,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_record_mac}}),!t.fail},i.write.update=function(t,e){return i.write.compressFunction(t,e,i.write)?i.write.cipherFunction(e,i.write)||t.error(t,{message:"Could not encrypt record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):t.error(t,{message:"Could not compress record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}),!t.fail},t.session){var n=t.session.sp;switch(t.session.cipherSuite.initSecurityParameters(n),n.keys=u.generateKeys(t,n),i.read.macKey=e?n.keys.server_write_MAC_key:n.keys.client_write_MAC_key,i.write.macKey=e?n.keys.client_write_MAC_key:n.keys.server_write_MAC_key,t.session.cipherSuite.initConnectionState(i,t,n),n.compression_algorithm){case u.CompressionMethod.none:break;case u.CompressionMethod.deflate:i.read.compressFunction=s,i.write.compressFunction=a;break;default:throw new Error("Unsupported compression algorithm.")}}return i},u.createRandom=function(){var t=new Date,e=+t+6e4*t.getTimezoneOffset(),r=i.util.createBuffer();return r.putInt32(e),r.putBytes(i.random.getBytes(28)),r},u.createRecord=function(t,e){return e.data?{type:e.type,version:{major:t.version.major,minor:t.version.minor},length:e.data.length(),fragment:e.data}:null},u.createAlert=function(t,e){var r=i.util.createBuffer();return r.putByte(e.level),r.putByte(e.description),u.createRecord(t,{type:u.ContentType.alert,data:r})},u.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};for(var e=i.util.createBuffer(),r=0;r<t.cipherSuites.length;++r){var n=t.cipherSuites[r];e.putByte(n.id[0]),e.putByte(n.id[1])}var a=e.length(),s=i.util.createBuffer();s.putByte(u.CompressionMethod.none);var o=s.length(),f=i.util.createBuffer();if(t.virtualHost){var l=i.util.createBuffer();l.putByte(0),l.putByte(0);var c=i.util.createBuffer();c.putByte(0),h(c,2,i.util.createBuffer(t.virtualHost));var d=i.util.createBuffer();h(d,2,c),h(l,2,d),f.putBuffer(l)}var p=f.length();p>0&&(p+=2);var m=t.session.id,g=m.length+1+2+4+28+2+a+1+o+p,y=i.util.createBuffer();return y.putByte(u.HandshakeType.client_hello),y.putInt24(g),y.putByte(t.version.major),y.putByte(t.version.minor),y.putBytes(t.session.sp.client_random),h(y,1,i.util.createBuffer(m)),h(y,2,e),h(y,1,s),p>0&&h(y,2,f),y},u.createServerHello=function(t){var e=t.session.id,r=e.length+1+2+4+28+2+1,n=i.util.createBuffer();return n.putByte(u.HandshakeType.server_hello),n.putInt24(r),n.putByte(t.version.major),n.putByte(t.version.minor),n.putBytes(t.session.sp.server_random),h(n,1,i.util.createBuffer(e)),n.putByte(t.session.cipherSuite.id[0]),n.putByte(t.session.cipherSuite.id[1]),n.putByte(t.session.compressionMethod),n},u.createCertificate=function(t){var e,r=t.entity===u.ConnectionEnd.client,n=null;t.getCertificate&&(e=r?t.session.certificateRequest:t.session.extensions.server_name.serverNameList,n=t.getCertificate(t,e));var a=i.util.createBuffer();if(null!==n)try{i.util.isArray(n)||(n=[n]);for(var s=null,o=0;o<n.length;++o){var f=i.pem.decode(n[o])[0];if("CERTIFICATE"!==f.type&&"X509 CERTIFICATE"!==f.type&&"TRUSTED CERTIFICATE"!==f.type){var l=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw l.headerType=f.type,l}if(f.procType&&"ENCRYPTED"===f.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var c=i.util.createBuffer(f.body);null===s&&(s=i.asn1.fromDer(c.bytes(),!1));var d=i.util.createBuffer();h(d,3,c),a.putBuffer(d)}n=i.pki.certificateFromAsn1(s),r?t.session.clientCertificate=n:t.session.serverCertificate=n}catch(e){return t.error(t,{message:"Could not send certificate list.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var p=3+a.length(),m=i.util.createBuffer();return m.putByte(u.HandshakeType.certificate),m.putInt24(p),h(m,3,a),m},u.createClientKeyExchange=function(t){var e=i.util.createBuffer();e.putByte(t.session.clientHelloVersion.major),e.putByte(t.session.clientHelloVersion.minor),e.putBytes(i.random.getBytes(46));var r=t.session.sp;r.pre_master_secret=e.getBytes();var n=(e=t.session.serverCertificate.publicKey.encrypt(r.pre_master_secret)).length+2,a=i.util.createBuffer();return a.putByte(u.HandshakeType.client_key_exchange),a.putInt24(n),a.putInt16(e.length),a.putBytes(e),a},u.createServerKeyExchange=function(t){return i.util.createBuffer()},u.getClientSignature=function(t,e){var r=i.util.createBuffer();r.putBuffer(t.session.md5.digest()),r.putBuffer(t.session.sha1.digest()),r=r.getBytes(),t.getSignature=t.getSignature||function(t,e,r){var n=null;if(t.getPrivateKey)try{n=t.getPrivateKey(t,t.session.clientCertificate),n=i.pki.privateKeyFromPem(n)}catch(e){t.error(t,{message:"Could not get private key.",cause:e,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}null===n?t.error(t,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):e=n.sign(e,null),r(t,e)},t.getSignature(t,r,e)},u.createCertificateVerify=function(t,e){var r=e.length+2,n=i.util.createBuffer();return n.putByte(u.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(e.length),n.putBytes(e),n},u.createCertificateRequest=function(t){var e=i.util.createBuffer();e.putByte(1);var r=i.util.createBuffer();for(var n in t.caStore.certs){var a=t.caStore.certs[n],s=i.pki.distinguishedNameToAsn1(a.subject),o=i.asn1.toDer(s);r.putInt16(o.length()),r.putBuffer(o)}var f=1+e.length()+2+r.length(),l=i.util.createBuffer();return l.putByte(u.HandshakeType.certificate_request),l.putInt24(f),h(l,1,e),h(l,2,r),l},u.createServerHelloDone=function(t){var e=i.util.createBuffer();return e.putByte(u.HandshakeType.server_hello_done),e.putInt24(0),e},u.createChangeCipherSpec=function(){var t=i.util.createBuffer();return t.putByte(1),t},u.createFinished=function(t){var e=i.util.createBuffer();e.putBuffer(t.session.md5.digest()),e.putBuffer(t.session.sha1.digest());var r=t.entity===u.ConnectionEnd.client,a=t.session.sp,s=r?"client finished":"server finished";e=n(a.master_secret,s,e.getBytes(),12);var o=i.util.createBuffer();return o.putByte(u.HandshakeType.finished),o.putInt24(e.length()),o.putBuffer(e),o},u.createHeartbeat=function(t,e,r){void 0===r&&(r=e.length);var n=i.util.createBuffer();n.putByte(t),n.putInt16(r),n.putBytes(e);var a=n.length(),s=Math.max(16,a-r-3);return n.putBytes(i.random.getBytes(s)),n},u.queue=function(t,e){if(e&&(0!==e.fragment.length()||e.type!==u.ContentType.handshake&&e.type!==u.ContentType.alert&&e.type!==u.ContentType.change_cipher_spec)){if(e.type===u.ContentType.handshake){var r=e.fragment.bytes();t.session.md5.update(r),t.session.sha1.update(r),r=null}var n;if(e.fragment.length()<=u.MaxFragment)n=[e];else{n=[];for(var a=e.fragment.bytes();a.length>u.MaxFragment;)n.push(u.createRecord(t,{type:e.type,data:i.util.createBuffer(a.slice(0,u.MaxFragment))})),a=a.slice(u.MaxFragment);a.length>0&&n.push(u.createRecord(t,{type:e.type,data:i.util.createBuffer(a)}))}for(var s=0;s<n.length&&!t.fail;++s){var o=n[s];t.state.current.write.update(t,o)&&t.records.push(o)}}},u.flush=function(t){for(var e=0;e<t.records.length;++e){var r=t.records[e];t.tlsData.putByte(r.type),t.tlsData.putByte(r.version.major),t.tlsData.putByte(r.version.minor),t.tlsData.putInt16(r.fragment.length()),t.tlsData.putBuffer(t.records[e].fragment)}return t.records=[],t.tlsDataReady(t)};var V=function(t){switch(t){case!0:return!0;case i.pki.certificateError.bad_certificate:return u.Alert.Description.bad_certificate;case i.pki.certificateError.unsupported_certificate:return u.Alert.Description.unsupported_certificate;case i.pki.certificateError.certificate_revoked:return u.Alert.Description.certificate_revoked;case i.pki.certificateError.certificate_expired:return u.Alert.Description.certificate_expired;case i.pki.certificateError.certificate_unknown:return u.Alert.Description.certificate_unknown;case i.pki.certificateError.unknown_ca:return u.Alert.Description.unknown_ca;default:return u.Alert.Description.bad_certificate}};for(var F in u.verifyCertificateChain=function(t,e){try{var r={};for(var n in t.verifyOptions)r[n]=t.verifyOptions[n];r.verify=function(e,r,n){V(e);var a=t.verify(t,e,r,n);if(!0!==a){if("object"==typeof a&&!i.util.isArray(a)){var s=new Error("The application rejected the certificate.");throw s.send=!0,s.alert={level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate},a.message&&(s.message=a.message),a.alert&&(s.alert.description=a.alert),s}a!==e&&(a=function(t){switch(t){case!0:return!0;case u.Alert.Description.bad_certificate:return i.pki.certificateError.bad_certificate;case u.Alert.Description.unsupported_certificate:return i.pki.certificateError.unsupported_certificate;case u.Alert.Description.certificate_revoked:return i.pki.certificateError.certificate_revoked;case u.Alert.Description.certificate_expired:return i.pki.certificateError.certificate_expired;case u.Alert.Description.certificate_unknown:return i.pki.certificateError.certificate_unknown;case u.Alert.Description.unknown_ca:return i.pki.certificateError.unknown_ca;default:return i.pki.certificateError.bad_certificate}}(a))}return a},i.pki.verifyCertificateChain(t.caStore,e,r)}catch(e){var a=e;("object"!=typeof a||i.util.isArray(a))&&(a={send:!0,alert:{level:u.Alert.Level.fatal,description:V(e)}}),"send"in a||(a.send=!0),"alert"in a||(a.alert={level:u.Alert.Level.fatal,description:V(a.error)}),t.error(t,a)}return!t.fail},u.createSessionCache=function(t,e){var r=null;if(t&&t.getSession&&t.setSession&&t.order)r=t;else{for(var n in(r={}).cache=t||{},r.capacity=Math.max(e||100,1),r.order=[],t)r.order.length<=e?r.order.push(n):delete t[n];r.getSession=function(t){var e=null,n=null;if(t?n=i.util.bytesToHex(t):r.order.length>0&&(n=r.order[0]),null!==n&&n in r.cache)for(var a in e=r.cache[n],delete r.cache[n],r.order)if(r.order[a]===n){r.order.splice(a,1);break}return e},r.setSession=function(t,e){if(r.order.length===r.capacity){var n=r.order.shift();delete r.cache[n]}n=i.util.bytesToHex(t),r.order.push(n),r.cache[n]=e}}return r},u.createConnection=function(t){var e;e=t.caStore?i.util.isArray(t.caStore)?i.pki.createCaStore(t.caStore):t.caStore:i.pki.createCaStore();var r=t.cipherSuites||null;if(null===r)for(var n in r=[],u.CipherSuites)r.push(u.CipherSuites[n]);var a=t.server?u.ConnectionEnd.server:u.ConnectionEnd.client,s=t.sessionCache?u.createSessionCache(t.sessionCache):null,o={version:{major:u.Version.major,minor:u.Version.minor},entity:a,sessionId:t.sessionId,caStore:e,sessionCache:s,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(t,e,r,i){return e},verifyOptions:t.verifyOptions||{},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:i.util.createBuffer(),tlsData:i.util.createBuffer(),data:i.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:function(e,r){r.origin=r.origin||(e.entity===u.ConnectionEnd.client?"client":"server"),r.send&&(u.queue(e,u.createAlert(e,r.alert)),u.flush(e));var i=!1!==r.fatal;i&&(e.fail=!0),t.error(e,r),i&&e.close(!1)},deflate:t.deflate||null,inflate:t.inflate||null,reset:function(t){o.version={major:u.Version.major,minor:u.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=(o.entity,u.ConnectionEnd.client,0),o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(t||void 0===t),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=u.createConnectionState(o)}};return o.reset(),o.handshake=function(t){if(o.entity!==u.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&0===o.handshakes&&(o.fail=!1),o.handshaking=!0;var e=null;(t=t||"").length>0&&(o.sessionCache&&(e=o.sessionCache.getSession(t)),null===e&&(t="")),0===t.length&&o.sessionCache&&null!==(e=o.sessionCache.getSession())&&(t=e.id),o.session={id:t,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:i.md.md5.create(),sha1:i.md.sha1.create()},e&&(o.version=e.version,o.session.sp=e.sp),o.session.sp.client_random=u.createRandom().getBytes(),o.open=!0,u.queue(o,u.createRecord(o,{type:u.ContentType.handshake,data:u.createClientHello(o)})),u.flush(o)}},o.process=function(t){var e=0;return t&&o.input.putBytes(t),o.fail||(null!==o.record&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),null===o.record&&(e=function(t){var e=0,r=t.input,n=r.length();if(n<5)e=5-n;else{t.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:i.util.createBuffer(),ready:!1};var a=t.record.version.major===t.version.major;a&&t.session&&t.session.version&&(a=t.record.version.minor===t.version.minor),a||t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}})}return e}(o)),o.fail||null===o.record||o.record.ready||(e=function(t){var e=0,r=t.input,i=r.length();return i<t.record.length?e=t.record.length-i:(t.record.fragment.putBytes(r.getBytes(t.record.length)),r.compact(),t.state.current.read.update(t,t.record)&&(null!==t.fragmented&&(t.fragmented.type===t.record.type?(t.fragmented.fragment.putBuffer(t.record.fragment),t.record=t.fragmented):t.error(t,{message:"Invalid fragmented record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unexpected_message}})),t.record.ready=!0)),e}(o)),!o.fail&&null!==o.record&&o.record.ready&&function(t,e){var r=e.type-u.ContentType.change_cipher_spec,i=k[t.entity][t.expect];r in i?i[r](t,e):u.handleUnexpected(t,e)}(o,o.record)),e},o.prepare=function(t){return u.queue(o,u.createRecord(o,{type:u.ContentType.application_data,data:i.util.createBuffer(t)})),u.flush(o)},o.prepareHeartbeatRequest=function(t,e){return t instanceof i.util.ByteBuffer&&(t=t.bytes()),void 0===e&&(e=t.length),o.expectedHeartbeatPayload=t,u.queue(o,u.createRecord(o,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_request,t,e)})),u.flush(o)},o.close=function(t){if(!o.fail&&o.sessionCache&&o.session){var e={id:o.session.id,version:o.session.version,sp:o.session.sp};e.sp.keys=null,o.sessionCache.setSession(e.id,e)}o.open&&(o.open=!1,o.input.clear(),(o.isConnected||o.handshaking)&&(o.isConnected=o.handshaking=!1,u.queue(o,u.createAlert(o,{level:u.Alert.Level.warning,description:u.Alert.Description.close_notify})),u.flush(o)),o.closed(o)),o.reset(t)},o},t.exports=i.tls=i.tls||{},u)"function"!=typeof u[F]&&(i.tls[F]=u[F]);i.tls.prf_tls1=n,i.tls.hmac_sha1=function(t,e,r){var n=i.hmac.create();n.start("SHA1",t);var a=i.util.createBuffer();return a.putInt32(e[0]),a.putInt32(e[1]),a.putByte(r.type),a.putByte(r.version.major),a.putByte(r.version.minor),a.putInt16(r.length),a.putBytes(r.fragment.bytes()),n.update(a.getBytes()),n.digest().getBytes()},i.tls.createSessionCache=u.createSessionCache,i.tls.createConnection=u.createConnection},4011:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},4050:(t,e,r)=>{var i=r(6168),n=r(9560),a=r(6698),s=r(2861).Buffer,o={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function h(t){i.call(this);var e,r=t.mode.toLowerCase(),n=o[r];e=t.decrypt?"decrypt":"encrypt";var a=t.key;s.isBuffer(a)||(a=s.from(a)),"des-ede"!==r&&"des-ede-cbc"!==r||(a=s.concat([a,a.slice(0,8)]));var h=t.iv;s.isBuffer(h)||(h=s.from(h)),this._des=n.create({key:a,iv:h,type:e})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],t.exports=h,a(h,i),h.prototype._update=function(t){return s.from(this._des.update(t))},h.prototype._final=function(){return s.from(this._des.final())}},4058:(t,e,r)=>{var i=r(8287).Buffer,n={};t.exports=n;var a={};n.encode=function(t,e,r){if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var i="";if(t instanceof Uint8Array){var n=0,a=e.length,s=e.charAt(0),o=[0];for(n=0;n<t.length;++n){for(var h=0,u=t[n];h<o.length;++h)u+=o[h]<<8,o[h]=u%a,u=u/a|0;for(;u>0;)o.push(u%a),u=u/a|0}for(n=0;0===t[n]&&n<t.length-1;++n)i+=s;for(n=o.length-1;n>=0;--n)i+=e[o[n]]}else i=function(t,e){var r=0,i=e.length,n=e.charAt(0),a=[0];for(r=0;r<t.length();++r){for(var s=0,o=t.at(r);s<a.length;++s)o+=a[s]<<8,a[s]=o%i,o=o/i|0;for(;o>0;)a.push(o%i),o=o/i|0}var h="";for(r=0;0===t.at(r)&&r<t.length()-1;++r)h+=n;for(r=a.length-1;r>=0;--r)h+=e[a[r]];return h}(t,e);if(r){var f=new RegExp(".{1,"+r+"}","g");i=i.match(f).join("\r\n")}return i},n.decode=function(t,e){if("string"!=typeof t)throw new TypeError('"input" must be a string.');if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');var r=a[e];if(!r){r=a[e]=[];for(var n=0;n<e.length;++n)r[e.charCodeAt(n)]=n}t=t.replace(/\s/g,"");var s=e.length,o=e.charAt(0),h=[0];for(n=0;n<t.length;n++){var u=r[t.charCodeAt(n)];if(void 0===u)return;for(var f=0,l=u;f<h.length;++f)l+=h[f]*s,h[f]=255&l,l>>=8;for(;l>0;)h.push(255&l),l>>=8}for(var c=0;t[c]===o&&c<t.length-1;++c)h.push(0);return void 0!==i?i.from(h.reverse()):new Uint8Array(h.reverse())}},4101:(t,e,r)=>{"use strict";var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(8078),o=r(1241),h=r(2861).Buffer;t.exports=function(t,e){var r,u=t.toString(),f=u.match(i);if(f){var l="aes"+f[1],c=h.from(f[2],"hex"),d=h.from(f[3].replace(/[\r\n]/g,""),"base64"),p=s(e,c.slice(0,8),parseInt(f[1],10)).key,m=[],g=o.createDecipheriv(l,p,c);m.push(g.update(d)),m.push(g.final()),r=h.concat(m)}else{var y=u.match(a);r=h.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(n)[1],data:r}}},4107:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).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],o=new Array(64);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function c(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(h,n),h.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},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,h=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=t.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((e=r[y-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var v=0;v<64;++v){var b=g+c(h)+u(h,p,m)+s[v]+r[v]|0,w=l(i)+f(i,n,a)|0;g=m,m=p,p=h,h=o+b|0,o=a,a=n,n=i,i=b+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},h.prototype._hash=function(){var t=a.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=h},4116:(t,e,r)=>{var i=r(8287),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(a(i,e),e.Buffer=s),a(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},4196:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!=r)throw new TypeError("Bad key length")}},4309:(t,e,r)=>{var i=r(276);r(2746);var n=i.asn1;e.privateKeyValidator={name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},e.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},4367:(t,e)=>{"use strict";var r=e;function i(t){return 1===t.length?"0"+t:t}function n(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var i=0;i<t.length;i++)r[i]=0|t[i];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16));else for(i=0;i<t.length;i++){var n=t.charCodeAt(i),a=n>>8,s=255&n;a?r.push(a,s):r.push(s)}return r},r.zero2=i,r.toHex=n,r.encode=function(t,e){return"hex"===e?n(t):t}},4589:t=>{"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},4598:(t,e,r)=>{var i=r(2153);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=i._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=i._reverse(e.tag)},4610:(t,e,r)=>{"use strict";t.exports=f;var i=r(6048).F,n=i.ERR_METHOD_NOT_IMPLEMENTED,a=i.ERR_MULTIPLE_CALLBACK,s=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=i.ERR_TRANSFORM_WITH_LENGTH_0,h=r(5382);function u(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function f(t){if(!(this instanceof f))return new f(t);h.call(this,t),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function l(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?c(this,null,null):this._flush((function(e,r){c(t,e,r)}))}function c(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new o;if(t._transformState.transforming)throw new s;return t.push(null)}r(6698)(f,h),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new n("_transform()"))},f.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},f.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},f.prototype._destroy=function(t,e){h.prototype._destroy.call(this,t,(function(t){e(t)}))}},4643:(t,e,r)=>{function i(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},4669:(t,e,r)=>{var i=e;i.der=r(82),i.pem=r(735)},4688:()=>{},4729:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(8310).Transform;function a(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(6698)(a,n),a.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(t){i=t}r(i)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)};var s="undefined"!=typeof Uint8Array,o="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(i.prototype instanceof Uint8Array||i.TYPED_ARRAY_SUPPORT);a.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=function(t,e){if(t instanceof i)return t;if("string"==typeof t)return i.from(t,e);if(o&&ArrayBuffer.isView(t)){if(0===t.byteLength)return i.alloc(0);var r=i.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(s&&t instanceof Uint8Array)return i.from(t);if(i.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return i.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,e);for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)r[this._blockOffset++]=t[n++];for(var h=0,u=8*t.length;u>0;++h)this._length[h]+=u,(u=this._length[h]/4294967296|0)>0&&(this._length[h]-=4294967296*u);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},4847:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(9404),a=r(6729).ec,s=r(8170),o=r(4589);function h(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}t.exports=function(t,e,r,u,f){var l=s(r);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var i=o[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new a(i),s=r.data.subjectPrivateKey.data;return n.verify(e,t,s)}(t,e,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var i=r.data.p,a=r.data.q,o=r.data.g,u=r.data.pub_key,f=s.signature.decode(t,"der"),l=f.s,c=f.r;h(l,a),h(c,a);var d=n.mont(i),p=l.invm(a);return 0===o.toRed(d).redPow(new n(e).mul(p).mod(a)).fromRed().mul(u.toRed(d).redPow(c.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(c)}(t,e,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");e=i.concat([f,e]);for(var c=l.modulus.byteLength(),d=[1],p=0;e.length+d.length+2<c;)d.push(255),p+=1;d.push(0);for(var m=-1;++m<e.length;)d.push(e[m]);d=i.from(d);var g=n.mont(l.modulus);t=(t=new n(t).toRed(g)).redPow(new n(l.publicExponent)),t=i.from(t.fromRed().toArray());var y=p<8?1:0;for(c=Math.min(t.length,d.length),t.length!==d.length&&(y=1),m=-1;++m<c;)y|=t[m]^d[m];return 0===y}},4910:(t,e,r)=>{var i=r(8287).Buffer,n=r(6473),a=new(r(2244)),s=new n(24),o=new n(11),h=new n(10),u=new n(3),f=new n(7),l=r(4934),c=r(3209);function d(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._pub=new n(t),this}function p(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._priv=new n(t),this}t.exports=g;var m={};function g(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function y(t,e){var r=new i(t.toArray());return e?r.toString(e):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in m)return m[i];var n,c=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!a.test(t))return c+=1,c+="02"===r||"05"===r?8:4,m[i]=c,c;switch(a.test(t.shrn(1))||(c+=2),r){case"02":t.mod(s).cmp(o)&&(c+=8);break;case"05":(n=t.mod(h)).cmp(u)&&n.cmp(f)&&(c+=8);break;default:c+=4}return m[i]=c,c}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new n(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(t){var e=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new i(e.toArray()),a=this.getPrime();if(r.length<a.length){var s=new i(a.length-r.length);s.fill(0),r=i.concat([s,r])}return r},g.prototype.getPublicKey=function(t){return y(this._pub,t)},g.prototype.getPrivateKey=function(t){return y(this._priv,t)},g.prototype.getPrime=function(t){return y(this.__prime,t)},g.prototype.getGenerator=function(t){return y(this._gen,t)},g.prototype.setGenerator=function(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this.__gen=t,this._gen=new n(t),this}},4934:(t,e,r)=>{var i=r(3209);t.exports=v,v.simpleSieve=g,v.fermatTest=y;var n=r(6473),a=new n(24),s=new(r(2244)),o=new n(1),h=new n(2),u=new n(5),f=(new n(16),new n(8),new n(10)),l=new n(3),c=(new n(7),new n(11)),d=new n(4),p=(new n(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<e&&t[n]<=i&&r%t[n]!=0;n++);e!==n&&t[n]<=i||(t[e++]=r)}return p=t,t}function g(t){for(var e=m(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function y(t){var e=n.mont(t);return 0===h.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function v(t,e){if(t<16)return new n(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new n(e);;){for(r=new n(i(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(o),r.testn(1)||r.iadd(h),e.cmp(h)){if(!e.cmp(u))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(a).cmp(c);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},5037:(t,e,r)=>{var i;function n(t){this.rand=t}if(t.exports=function(t){return i||(i=new n(null)),i.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=r(3776);if("function"!=typeof a.randomBytes)throw new Error("Not supported");n.prototype._rand=function(t){return a.randomBytes(t)}}catch(t){}},5071:(t,e,r)=>{var i=r(276);r(2746),r(1696),r(6418),r(9954),r(2698),r(9356),r(5805),r(1598),r(7619),r(8392);var n=i.asn1,a=i.pki,s=t.exports=i.pkcs12=i.pkcs12||{},o={name:"ContentInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:n.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},h={name:"PFX",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},o,{name:"PFX.macData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:n.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},u={name:"SafeBag",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:n.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},f={name:"Attribute",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,capture:"values"}]},l={name:"CertBag",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:n.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:n.Class.UNIVERSAL,type:n.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function c(t,e,r,i){for(var n=[],a=0;a<t.length;a++)for(var s=0;s<t[a].safeBags.length;s++){var o=t[a].safeBags[s];void 0!==i&&o.type!==i||(null!==e?void 0!==o.attributes[e]&&o.attributes[e].indexOf(r)>=0&&n.push(o):n.push(o))}return n}function d(t){if(t.composed||t.constructed){for(var e=i.util.createBuffer(),r=0;r<t.value.length;++r)e.putBytes(t.value[r].value);t.composed=t.constructed=!1,t.value=e.getBytes()}return t}function p(t,e){var r={},s=[];if(!n.validate(t,i.pkcs7.asn1.encryptedDataValidator,r,s))throw(o=new Error("Cannot read EncryptedContentInfo.")).errors=s,o;var o,h=n.derToOid(r.contentType);if(h!==a.oids.data)throw(o=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=h,o;h=n.derToOid(r.encAlgorithm);var u=a.pbe.getCipher(h,r.encParameter,e),f=d(r.encryptedContentAsn1),l=i.util.createBuffer(f.value);if(u.update(l),!u.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return u.output.getBytes()}function m(t,e,r){if(!e&&0===t.length)return[];if((t=n.fromDer(t,e)).tagClass!==n.Class.UNIVERSAL||t.type!==n.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var i=[],s=0;s<t.value.length;s++){var o=t.value[s],h={},f=[];if(!n.validate(o,u,h,f))throw(y=new Error("Cannot read SafeBag.")).errors=f,y;var c,d,p={type:n.derToOid(h.bagId),attributes:g(h.bagAttributes)};i.push(p);var m=h.bagValue.value[0];switch(p.type){case a.oids.pkcs8ShroudedKeyBag:if(null===(m=a.decryptPrivateKeyInfo(m,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case a.oids.keyBag:try{p.key=a.privateKeyFromAsn1(m)}catch(t){p.key=null,p.asn1=m}continue;case a.oids.certBag:c=l,d=function(){if(n.derToOid(h.certId)!==a.oids.x509Certificate){var t=new Error("Unsupported certificate type, only X.509 supported.");throw t.oid=n.derToOid(h.certId),t}var r=n.fromDer(h.cert,e);try{p.cert=a.certificateFromAsn1(r,!0)}catch(t){p.cert=null,p.asn1=r}};break;default:var y;throw(y=new Error("Unsupported PKCS#12 SafeBag type.")).oid=p.type,y}if(void 0!==c&&!n.validate(m,c,h,f))throw(y=new Error("Cannot read PKCS#12 "+c.name)).errors=f,y;d()}return i}function g(t){var e={};if(void 0!==t)for(var r=0;r<t.length;++r){var i={},s=[];if(!n.validate(t[r],f,i,s)){var o=new Error("Cannot read PKCS#12 BagAttribute.");throw o.errors=s,o}var h=n.derToOid(i.oid);if(void 0!==a.oids[h]){e[a.oids[h]]=[];for(var u=0;u<i.values.length;++u)e[a.oids[h]].push(i.values[u].value)}}return e}s.pkcs12FromAsn1=function(t,e,r){"string"==typeof e?(r=e,e=!0):void 0===e&&(e=!0);var u={};if(!n.validate(t,h,u,[]))throw(f=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=f,f;var f,l={version:u.version.charCodeAt(0),safeContents:[],getBags:function(t){var e,r={};return"localKeyId"in t?e=t.localKeyId:"localKeyIdHex"in t&&(e=i.util.hexToBytes(t.localKeyIdHex)),void 0===e&&!("friendlyName"in t)&&"bagType"in t&&(r[t.bagType]=c(l.safeContents,null,null,t.bagType)),void 0!==e&&(r.localKeyId=c(l.safeContents,"localKeyId",e,t.bagType)),"friendlyName"in t&&(r.friendlyName=c(l.safeContents,"friendlyName",t.friendlyName,t.bagType)),r},getBagsByFriendlyName:function(t,e){return c(l.safeContents,"friendlyName",t,e)},getBagsByLocalKeyId:function(t,e){return c(l.safeContents,"localKeyId",t,e)}};if(3!==u.version.charCodeAt(0))throw(f=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=u.version.charCodeAt(0),f;if(n.derToOid(u.contentType)!==a.oids.data)throw(f=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=n.derToOid(u.contentType),f;var g=u.content.value[0];if(g.tagClass!==n.Class.UNIVERSAL||g.type!==n.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(g=d(g),u.mac){var y=null,v=0,b=n.derToOid(u.macAlgorithm);switch(b){case a.oids.sha1:y=i.md.sha1.create(),v=20;break;case a.oids.sha256:y=i.md.sha256.create(),v=32;break;case a.oids.sha384:y=i.md.sha384.create(),v=48;break;case a.oids.sha512:y=i.md.sha512.create(),v=64;break;case a.oids.md5:y=i.md.md5.create(),v=16}if(null===y)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+b);var w=new i.util.ByteBuffer(u.macSalt),M="macIterations"in u?parseInt(i.util.bytesToHex(u.macIterations),16):1,_=s.generateKey(r,w,3,M,v,y),S=i.hmac.create();if(S.start(y,_),S.update(g.value),S.getMac().getBytes()!==u.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(t,e,r,i){if((e=n.fromDer(e,r)).tagClass!==n.Class.UNIVERSAL||e.type!==n.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s<e.value.length;s++){var h=e.value[s],u={},f=[];if(!n.validate(h,o,u,f))throw(y=new Error("Cannot read ContentInfo.")).errors=f,y;var l={encrypted:!1},c=null,g=u.content.value[0];switch(n.derToOid(u.contentType)){case a.oids.data:if(g.tagClass!==n.Class.UNIVERSAL||g.type!==n.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");c=d(g).value;break;case a.oids.encryptedData:c=p(g,i),l.encrypted=!0;break;default:var y;throw(y=new Error("Unsupported PKCS#12 contentType.")).contentType=n.derToOid(u.contentType),y}l.safeBags=m(c,r,i),t.safeContents.push(l)}}(l,g.value,e,r),l},s.toPkcs12Asn1=function(t,e,r,o){(o=o||{}).saltSize=o.saltSize||8,o.count=o.count||2048,o.algorithm=o.algorithm||o.encAlgorithm||"aes128","useMac"in o||(o.useMac=!0),"localKeyId"in o||(o.localKeyId=null),"generateLocalKeyId"in o||(o.generateLocalKeyId=!0);var h,u=o.localKeyId;if(null!==u)u=i.util.hexToBytes(u);else if(o.generateLocalKeyId)if(e){var f=i.util.isArray(e)?e[0]:e;"string"==typeof f&&(f=a.certificateFromPem(f)),(T=i.md.sha1.create()).update(n.toDer(a.certificateToAsn1(f)).getBytes()),u=T.digest().getBytes()}else u=i.random.getBytes(20);var l=[];null!==u&&l.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.localKeyId).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,u)])])),"friendlyName"in o&&l.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.friendlyName).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,n.Type.BMPSTRING,!1,o.friendlyName)])])),l.length>0&&(h=n.create(n.Class.UNIVERSAL,n.Type.SET,!0,l));var c=[],d=[];null!==e&&(d=i.util.isArray(e)?e:[e]);for(var p=[],m=0;m<d.length;++m){"string"==typeof(e=d[m])&&(e=a.certificateFromPem(e));var g=0===m?h:void 0,y=a.certificateToAsn1(e),v=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.certBag).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.x509Certificate).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(y).getBytes())])])]),g]);p.push(v)}if(p.length>0){var b=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,p),w=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.data).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(b).getBytes())])]);c.push(w)}var M=null;if(null!==t){var _=a.wrapRsaPrivateKey(a.privateKeyToAsn1(t));M=null===r?n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.keyBag).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[_]),h]):n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.pkcs8ShroudedKeyBag).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[a.encryptPrivateKeyInfo(_,r,o)]),h]);var S=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[M]),E=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.data).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(S).getBytes())])]);c.push(E)}var C,A=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,c);if(o.useMac){var T=i.md.sha1.create(),B=new i.util.ByteBuffer(i.random.getBytes(o.saltSize)),I=o.count,k=(t=s.generateKey(r,B,3,I,20),i.hmac.create());k.start(T,t),k.update(n.toDer(A).getBytes());var R=k.getMac();C=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.sha1).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,R.getBytes())]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,B.getBytes()),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(I).getBytes())])}return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(3).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(a.oids.data).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(A).getBytes())])]),C])},s.generateKey=i.pbe.generatePkcs12Key},5122:t=>{t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},5124:(t,e,r)=>{var i=r(276);r(7619);var n=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],a=[1,2,3,5],s=function(t,e){return t<<e&65535|(65535&t)>>16-e},o=function(t,e){return(65535&t)>>e|t<<16-e&65535};t.exports=i.rc2=i.rc2||{},i.rc2.expandKey=function(t,e){"string"==typeof t&&(t=i.util.createBuffer(t)),e=e||128;var r,a=t,s=t.length(),o=e,h=Math.ceil(o/8),u=255>>(7&o);for(r=s;r<128;r++)a.putByte(n[a.at(r-1)+a.at(r-s)&255]);for(a.setAt(128-h,n[a.at(128-h)&u]),r=127-h;r>=0;r--)a.setAt(r,n[a.at(r+1)^a.at(r+h)]);return a};var h=function(t,e,r){var n,h,u,f,l=!1,c=null,d=null,p=null,m=[];for(t=i.rc2.expandKey(t,e),u=0;u<64;u++)m.push(t.getInt16Le());r?(n=function(t){for(u=0;u<4;u++)t[u]+=m[f]+(t[(u+3)%4]&t[(u+2)%4])+(~t[(u+3)%4]&t[(u+1)%4]),t[u]=s(t[u],a[u]),f++},h=function(t){for(u=0;u<4;u++)t[u]+=m[63&t[(u+3)%4]]}):(n=function(t){for(u=3;u>=0;u--)t[u]=o(t[u],a[u]),t[u]-=m[f]+(t[(u+3)%4]&t[(u+2)%4])+(~t[(u+3)%4]&t[(u+1)%4]),f--},h=function(t){for(u=3;u>=0;u--)t[u]-=m[63&t[(u+3)%4]]});var g=function(t){var e=[];for(u=0;u<4;u++){var i=c.getInt16Le();null!==p&&(r?i^=p.getInt16Le():p.putInt16Le(i)),e.push(65535&i)}f=r?0:63;for(var n=0;n<t.length;n++)for(var a=0;a<t[n][0];a++)t[n][1](e);for(u=0;u<4;u++)null!==p&&(r?p.putInt16Le(e[u]):e[u]^=p.getInt16Le()),d.putInt16Le(e[u])},y=null;return y={start:function(t,e){t&&"string"==typeof t&&(t=i.util.createBuffer(t)),l=!1,c=i.util.createBuffer(),d=e||new i.util.createBuffer,p=t,y.output=d},update:function(t){for(l||c.putBuffer(t);c.length()>=8;)g([[5,n],[1,h],[6,n],[1,h],[5,n]])},finish:function(t){var e=!0;if(r)if(t)e=t(8,c,!r);else{var i=8===c.length()?8:8-c.length();c.fillWithByte(i,i)}if(e&&(l=!0,y.update()),!r&&(e=0===c.length()))if(t)e=t(8,d,!r);else{var n=d.length(),a=d.at(n-1);a>n?e=!1:d.truncate(a)}return e}}};i.rc2.startEncrypting=function(t,e,r){var n=i.rc2.createEncryptionCipher(t,128);return n.start(e,r),n},i.rc2.createEncryptionCipher=function(t,e){return h(t,e,!0)},i.rc2.startDecrypting=function(t,e,r){var n=i.rc2.createDecryptionCipher(t,128);return n.start(e,r),n},i.rc2.createDecryptionCipher=function(t,e){return h(t,e,!1)}},5157:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},5242:(t,e,r)=>{"use strict";t.exports=a;var i=r(1816),n=Object.create(r(5622));function a(t){if(!(this instanceof a))return new a(t);i.call(this,t)}n.inherits=r(6698),n.inherits(a,i),a.prototype._transform=function(t,e,r){r(null,t)}},5250:(t,e,r)=>{var i=r(276);r(7619),i.mgf=i.mgf||{},(t.exports=i.mgf.mgf1=i.mgf1=i.mgf1||{}).create=function(t){return{generate:function(e,r){for(var n=new i.util.ByteBuffer,a=Math.ceil(r/t.digestLength),s=0;s<a;s++){var o=new i.util.ByteBuffer;o.putInt32(s),t.start(),t.update(e+o.getBytes()),n.putBuffer(t.digest())}return n.truncate(n.length()-r),n.getBytes()}}}},5264:(t,e,r)=>{var i=r(2861).Buffer;function n(t,e,r){for(var i,n,s=-1,o=0;++s<8;)i=e&1<<7-s?128:0,o+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^i))>>s%8,t._prev=a(t._prev,r?i:n);return o}function a(t,e){var r=t.length,n=-1,a=i.allocUnsafe(t.length);for(t=i.concat([t,i.from([e])]);++n<r;)a[n]=t[n]<<1|t[n+1]>>7;return a}e.encrypt=function(t,e,r){for(var a=e.length,s=i.allocUnsafe(a),o=-1;++o<a;)s[o]=n(t,e[o],r);return s}},5279:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698),a=r(2808),s=r(2211);function o(t,e){i.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),a=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:r})]}function h(t){a.call(this,t);var e=new o(this.type,this.options.key);this._edeState=e}n(h,a),t.exports=h,h.create=function(t){return new h(t)},h.prototype._update=function(t,e,r,i){var n=this._edeState;n.ciphers[0]._update(t,e,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},h.prototype._pad=s.prototype._pad,h.prototype._unpad=s.prototype._unpad},5291:(t,e,r)=>{"use strict";var i=r(6048).F.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,n){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,n,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new i(n?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},5340:()=>{},5359:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(3507),a=r(7332),s=r(6729).ec,o=r(9404),h=r(8170),u=r(4589);function f(t,e,r,a){if((t=i.from(t.toArray())).length<e.byteLength()){var s=i.alloc(e.byteLength()-t.length);t=i.concat([s,t])}var o=r.length,h=function(t,e){t=(t=l(t,e)).mod(e);var r=i.from(t.toArray());if(r.length<e.byteLength()){var n=i.alloc(e.byteLength()-r.length);r=i.concat([n,r])}return r}(r,e),u=i.alloc(o);u.fill(1);var f=i.alloc(o);return f=n(a,f).update(u).update(i.from([0])).update(t).update(h).digest(),u=n(a,f).update(u).digest(),{k:f=n(a,f).update(u).update(i.from([1])).update(t).update(h).digest(),v:u=n(a,f).update(u).digest()}}function l(t,e){var r=new o(t),i=(t.length<<3)-e.bitLength();return i>0&&r.ishrn(i),r}function c(t,e,r){var a,s;do{for(a=i.alloc(0);8*a.length<t.bitLength();)e.v=n(r,e.k).update(e.v).digest(),a=i.concat([a,e.v]);s=l(a,t),e.k=n(r,e.k).update(e.v).update(i.from([0])).digest(),e.v=n(r,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function d(t,e,r,i){return t.toRed(o.mont(r)).redPow(e).fromRed().mod(i)}t.exports=function(t,e,r,n,p){var m=h(e);if(m.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return function(t,e){var r=u[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var n=new s(r).keyFromPrivate(e.privateKey).sign(t);return i.from(n.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==n)throw new Error("wrong private key type");return function(t,e,r){for(var n,a=e.params.priv_key,s=e.params.p,h=e.params.q,u=e.params.g,p=new o(0),m=l(t,h).mod(h),g=!1,y=f(a,h,t,r);!1===g;)p=d(u,n=c(h,y,r),s,h),0===(g=n.invm(h).imul(m.add(a.mul(p))).mod(h)).cmpn(0)&&(g=!1,p=new o(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var r=[48,t.length+e.length+4,2,t.length];return r=r.concat(t,[2,e.length],e),i.from(r)}(p,g)}(t,m,r)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");if(void 0!==e.padding&&1!==e.padding)throw new Error("illegal or unsupported padding mode");t=i.concat([p,t]);for(var g=m.modulus.byteLength(),y=[0,1];t.length+y.length+1<g;)y.push(255);y.push(0);for(var v=-1;++v<t.length;)y.push(t[v]);return a(y,m)},t.exports.getKey=f,t.exports.makeKey=c},5380:(t,e,r)=>{var i=r(8287).Buffer,n=r(4934),a=r(3241),s=r(4910),o={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new i(a[t].prime,"hex"),r=new i(a[t].gen,"hex");return new s(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,a,h){return i.isBuffer(r)||void 0===o[r]?t(e,"binary",r,a):(r=r||"binary",h=h||"binary",a=a||new i([2]),i.isBuffer(a)||(a=new i(a,h)),"number"==typeof e?new s(n(e,a),a,!0):(i.isBuffer(e)||(e=new i(e,r)),new s(e,a,!0)))}},5382:(t,e,r)=>{"use strict";var i=r(5606),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var a=r(5412),s=r(6708);r(6698)(f,a);for(var o=n(s.prototype),h=0;h<o.length;h++){var u=o[h];f.prototype[u]||(f.prototype[u]=s.prototype[u])}function f(t){if(!(this instanceof f))return new f(t);a.call(this,t),s.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||i.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},5412:(t,e,r)=>{"use strict";var i,n=r(5606);t.exports=C,C.ReadableState=E,r(7007).EventEmitter;var a,s=function(t,e){return t.listeners(e).length},o=r(345),h=r(8287).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(9838);a=f&&f.debuglog?f.debuglog("stream"):function(){};var l,c,d,p=r(2726),m=r(5896),g=r(5291).getHighWaterMark,y=r(6048).F,v=y.ERR_INVALID_ARG_TYPE,b=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,M=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(6698)(C,o);var _=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,e,n){i=i||r(5382),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,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.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=r(3141).I),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function C(t){if(i=i||r(5382),!(this instanceof C))return new C(t);var e=this instanceof i;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function A(t,e,r,i,n){a("readableAddChunk",e);var s,o=t._readableState;if(null===e)o.reading=!1,function(t,e){if(a("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}}(t,o);else if(n||(s=function(t,e){var r,i;return i=e,h.isBuffer(i)||i instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],e)),r}(o,e)),s)_(t,s);else if(o.objectMode||e&&e.length>0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),i)o.endEmitted?_(t,new M):T(t,o,e,!0);else if(o.ended)_(t,new b);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?T(t,o,e,!1):N(t,o)):T(t,o,e,!1)}else i||(o.reading=!1,N(t,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function T(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),N(t,e)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),C.prototype.destroy=m.destroy,C.prototype._undestroy=m.undestroy,C.prototype._destroy=function(t,e){e(t)},C.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=h.from(t,e),e=""),r=!0),A(this,t,e,!1,r)},C.prototype.unshift=function(t){return A(this,t,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(t){l||(l=r(3141).I);var e=new l(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=e.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var B=1073741824;function I(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=B?t=B:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;a("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(a("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(R,t))}function R(t){var e=t._readableState;a("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(t)}function N(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(L,t,e))}function L(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(a("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function x(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function U(t){a("readable nexttick read 0"),t.read(0)}function P(t,e){a("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(a("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;a("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(K,e,t))}function K(t,e){if(a("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}C.prototype.read=function(t){a("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return a("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&j(this),null;var i,n=e.needReadable;return a("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&a("length less than watermark",n=!0),e.ended||e.reading?a("reading or ended",n=!1):n&&(a("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=I(r,e))),null===(i=t>0?O(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==i&&this.emit("data",i),i},C.prototype._read=function(t){_(this,new w("_read()"))},C.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,e);var o=e&&!1===e.end||t===n.stdout||t===n.stderr?m:h;function h(){a("onend"),t.end()}i.endEmitted?n.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,s){a("onunpipe"),n===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,a("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",c),t.removeListener("unpipe",e),r.removeListener("end",h),r.removeListener("end",m),r.removeListener("data",l),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}));var u=function(t){return function(){var e=t._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,D(t))}}(r);t.on("drain",u);var f=!1;function l(e){a("ondata");var n=t.write(e);a("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==q(i.pipes,t))&&!f&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(e){a("onerror",e),m(),t.removeListener("error",c),0===s(t,"error")&&_(t,e)}function d(){t.removeListener("finish",p),m()}function p(){a("onfinish"),t.removeListener("close",d),m()}function m(){a("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",r),i.flowing||(a("pipe resume"),r.resume()),t},C.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=q(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},C.prototype.on=function(t,e){var r=o.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(U,this))),r},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(x,this),r},C.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(x,this),e},C.prototype.resume=function(){var t=this._readableState;return t.flowing||(a("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(P,t,e))}(this,t)),t.paused=!1,this},C.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(a("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){a("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<S.length;s++)t.on(S[s],this.emit.bind(this,S[s]));return this._read=function(e){a("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(2955)),c(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),C._fromList=O,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(t,e){return void 0===d&&(d=r(5157)),d(C,t,e)})},5567:(t,e,r)=>{t.exports=r(7007).EventEmitter},5579:t=>{"use strict";t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},5606:t=>{var e,r,i=t.exports={};function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var o,h=[],u=!1,f=-1;function l(){u&&o&&(u=!1,o.length?h=o.concat(h):f=-1,h.length&&c())}function c(){if(!u){var t=s(l);u=!0;for(var e=h.length;e;){for(o=h,h=[];++f<e;)o&&o[f].run();f=-1,e=h.length}o=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new d(t,e)),1!==h.length||u||s(c)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},5622:(t,e,r)=>{function i(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===i(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===i(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===i(t)},e.isError=function(t){return"[object Error]"===i(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(8287).Buffer.isBuffer},5715:(t,e,r)=>{"use strict";t.exports=r(2951)},5799:(t,e,r)=>{var i=r(530),n=r(2356),a=r(2861).Buffer,s=r(650),o=r(6168),h=r(462),u=r(8078);function f(t,e,r){o.call(this),this._cache=new c,this._cipher=new h.AES(e),this._prev=a.from(r),this._mode=t,this._autopadding=!0}r(6698)(f,o),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return a.concat(i)};var l=a.alloc(16,16);function c(){this.cache=a.allocUnsafe(0)}function d(t,e,r){var o=i[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=a.from(e)),e.length!==o.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=a.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===o.type?new s(o.module,e,r):"auth"===o.type?new n(o.module,e,r):new f(o.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},c.prototype.add=function(t){this.cache=a.concat([this.cache,t])},c.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},c.prototype.flush=function(){for(var t=16-this.cache.length,e=a.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return a.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var r=i[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(e,!1,r.key,r.iv);return d(t,n.key,n.iv)}},5805:(t,e,r)=>{var i=r(276);if(r(2746),r(3736),r(6418),r(7501),r(268),r(9356),r(7619),void 0===n)var n=i.jsbn.BigInteger;var a=i.util.isNodejs?r(310):null,s=i.asn1,o=i.util;i.pki=i.pki||{},t.exports=i.pki.rsa=i.rsa=i.rsa||{};var h=i.pki,u=[6,4,2,4,2,4,6,2],f={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},c={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=i.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},m=function(t){var e;if(!(t.algorithm in h.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}e=h.oids[t.algorithm];var i=s.oidToDer(e).getBytes(),n=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),a=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);a.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,i)),a.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var o=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,t.digest().getBytes());return n.value.push(a),n.value.push(o),s.toDer(n).getBytes()},g=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);var a;e.dP||(e.dP=e.d.mod(e.p.subtract(n.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(n.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));do{a=new n(i.util.bytesToHex(i.random.getBytes(e.n.bitLength()/8)),16)}while(a.compareTo(e.n)>=0||!a.gcd(e.n).equals(n.ONE));for(var s=(t=t.multiply(a.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),o=t.mod(e.q).modPow(e.dQ,e.q);s.compareTo(o)<0;)s=s.add(e.p);var h=s.subtract(o).multiply(e.qInv).mod(e.p).multiply(e.q).add(o);return h.multiply(a.modInverse(e.n)).mod(e.n)};function y(t,e,r){var n=i.util.createBuffer(),a=Math.ceil(e.n.bitLength()/8);if(t.length>a-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=a-11,s}n.putByte(0),n.putByte(r);var o,h=a-3-t.length;if(0===r||1===r){o=0===r?0:255;for(var u=0;u<h;++u)n.putByte(o)}else for(;h>0;){var f=0,l=i.random.getBytes(h);for(u=0;u<h;++u)0===(o=l.charCodeAt(u))?++f:n.putByte(o);h=f}return n.putByte(0),n.putBytes(t),n}function v(t,e,r,n){var a=Math.ceil(e.n.bitLength()/8),s=i.util.createBuffer(t),o=s.getByte(),h=s.getByte();if(0!==o||r&&0!==h&&1!==h||!r&&2!=h||r&&0===h&&void 0===n)throw new Error("Encryption block is invalid.");var u=0;if(0===h){u=a-3-n;for(var f=0;f<u;++f)if(0!==s.getByte())throw new Error("Encryption block is invalid.")}else if(1===h)for(u=0;s.length()>1;){if(255!==s.getByte()){--s.read;break}++u}else if(2===h)for(u=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++u}if(0!==s.getByte()||u!==a-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function b(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=i.util.hexToBytes(e);return!(r.length>1)||(0!==r.charCodeAt(0)||128&r.charCodeAt(1))&&(255!==r.charCodeAt(0)||128&~r.charCodeAt(1))?r:r.substr(1)}function w(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function M(t){return i.util.isNodejs&&"function"==typeof a[t]}function _(t){return void 0!==o.globalScope&&"object"==typeof o.globalScope.crypto&&"object"==typeof o.globalScope.crypto.subtle&&"function"==typeof o.globalScope.crypto.subtle[t]}function S(t){return void 0!==o.globalScope&&"object"==typeof o.globalScope.msCrypto&&"object"==typeof o.globalScope.msCrypto.subtle&&"function"==typeof o.globalScope.msCrypto.subtle[t]}function E(t){for(var e=i.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}h.rsa.encrypt=function(t,e,r){var a,s=r,o=Math.ceil(e.n.bitLength()/8);!1!==r&&!0!==r?(s=2===r,a=y(t,e,r)):(a=i.util.createBuffer()).putBytes(t);for(var h=new n(a.toHex(),16),u=g(h,e,s).toString(16),f=i.util.createBuffer(),l=o-Math.ceil(u.length/2);l>0;)f.putByte(0),--l;return f.putBytes(i.util.hexToBytes(u)),f.getBytes()},h.rsa.decrypt=function(t,e,r,a){var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var o=new Error("Encrypted message length is invalid.");throw o.length=t.length,o.expected=s,o}var h=new n(i.util.createBuffer(t).toHex(),16);if(h.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=g(h,e,r).toString(16),f=i.util.createBuffer(),l=s-Math.ceil(u.length/2);l>0;)f.putByte(0),--l;return f.putBytes(i.util.hexToBytes(u)),!1!==a?v(f.getBytes(),e,r):f.getBytes()},h.rsa.createKeyPairGenerationState=function(t,e,r){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var a,s=(r=r||{}).prng||i.random,o={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r<t.length;++r)t[r]=e.charCodeAt(r)}},h=r.algorithm||"PRIMEINC";if("PRIMEINC"!==h)throw new Error("Invalid key generation algorithm: "+h);return(a={algorithm:h,state:0,bits:t,rng:o,eInt:e||65537,e:new n(null),p:null,q:null,qBits:t>>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(a.eInt),a},h.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new n(null);r.fromInt(30);for(var i,a=0,s=function(t,e){return t|e},o=+new Date,f=0;null===t.keys&&(e<=0||f<e);){if(0===t.state){var l=null===t.p?t.pBits:t.qBits,c=l-1;0===t.pqState?(t.num=new n(l,t.rng),t.num.testBit(c)||t.num.bitwiseTo(n.ONE.shiftLeft(c),s,t.num),t.num.dAddOffset(31-t.num.mod(r).byteValue(),0),a=0,++t.pqState):1===t.pqState?t.num.bitLength()>l?t.pqState=0:t.num.isProbablePrime(w(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(u[a++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(n.ONE).gcd(t.e).compareTo(n.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(n.ONE),t.q1=t.q.subtract(n.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(n.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var d=t.e.modInverse(t.phi);t.keys={privateKey:h.rsa.setPrivateKey(t.n,t.e,d,t.p,t.q,d.mod(t.p1),d.mod(t.q1),t.q.modInverse(t.p)),publicKey:h.rsa.setPublicKey(t.n,t.e)}}f+=(i=+new Date)-o,o=i}return null!==t.keys},h.rsa.generateKeyPair=function(t,e,r,u){if(1===arguments.length?"object"==typeof t?(r=t,t=void 0):"function"==typeof t&&(u=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof e?(u=e,e=void 0):"number"!=typeof e&&(r=e,e=void 0):(r=t,u=e,t=void 0,e=void 0):3===arguments.length&&("number"==typeof e?"function"==typeof r&&(u=r,r=void 0):(u=r,r=e,e=void 0)),r=r||{},void 0===t&&(t=r.bits||2048),void 0===e&&(e=r.e||65537),!i.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(65537===e||3===e))if(u){if(M("generateKeyPair"))return a.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(t,e,r){if(t)return u(t);u(null,{privateKey:h.privateKeyFromPem(r),publicKey:h.publicKeyFromPem(e)})}));if(_("generateKey")&&_("exportKey"))return o.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:E(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(t){return o.globalScope.crypto.subtle.exportKey("pkcs8",t.privateKey)})).then(void 0,(function(t){u(t)})).then((function(t){if(t){var e=h.privateKeyFromAsn1(s.fromDer(i.util.createBuffer(t)));u(null,{privateKey:e,publicKey:h.setRsaPublicKey(e.n,e.e)})}}));if(S("generateKey")&&S("exportKey")){var f=o.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:E(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return f.oncomplete=function(t){var e=t.target.result,r=o.globalScope.msCrypto.subtle.exportKey("pkcs8",e.privateKey);r.oncomplete=function(t){var e=t.target.result,r=h.privateKeyFromAsn1(s.fromDer(i.util.createBuffer(e)));u(null,{privateKey:r,publicKey:h.setRsaPublicKey(r.n,r.e)})},r.onerror=function(t){u(t)}},void(f.onerror=function(t){u(t)})}}else if(M("generateKeyPairSync")){var l=a.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:h.privateKeyFromPem(l.privateKey),publicKey:h.publicKeyFromPem(l.publicKey)}}var c=h.rsa.createKeyPairGenerationState(t,e,r);if(!u)return h.rsa.stepKeyPairGenerationState(c,0),c.keys;!function(t,e,r){"function"==typeof e&&(r=e,e={});var a={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};function s(){o(t.pBits,(function(e,i){return e?r(e):(t.p=i,null!==t.q?u(e,t.q):void o(t.qBits,u))}))}function o(t,e){i.prime.generateProbablePrime(t,a,e)}function u(e,i){if(e)return r(e);if(t.q=i,t.p.compareTo(t.q)<0){var a=t.p;t.p=t.q,t.q=a}if(0!==t.p.subtract(n.ONE).gcd(t.e).compareTo(n.ONE))return t.p=null,void s();if(0!==t.q.subtract(n.ONE).gcd(t.e).compareTo(n.ONE))return t.q=null,void o(t.qBits,u);if(t.p1=t.p.subtract(n.ONE),t.q1=t.q.subtract(n.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(n.ONE))return t.p=t.q=null,void s();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void o(t.qBits,u);var f=t.e.modInverse(t.phi);t.keys={privateKey:h.rsa.setPrivateKey(t.n,t.e,f,t.p,t.q,f.mod(t.p1),f.mod(t.q1),t.q.modInverse(t.p)),publicKey:h.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}"prng"in e&&(a.prng=e.prng),s()}(c,r,u)},h.setRsaPublicKey=h.rsa.setPublicKey=function(t,e){var r={n:t,e,encrypt:function(t,e,n){if("string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,r){return y(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return i.pkcs1.encode_rsa_oaep(e,t,n)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"==typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var a=e.encode(t,r,!0);return h.rsa.encrypt(a,r,!0)},verify:function(t,e,n,a){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),void 0===a&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===n?n={verify:function(t,e){e=v(e,r,!0);var n=s.fromDer(e,{parseAllBytes:a._parseAllDigestBytes}),o={},h=[];if(!s.validate(n,p,o,h))throw(u=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=h,u;var u,f=s.derToOid(o.algorithmIdentifier);if(f!==i.oids.md2&&f!==i.oids.md5&&f!==i.oids.sha1&&f!==i.oids.sha224&&f!==i.oids.sha256&&f!==i.oids.sha384&&f!==i.oids.sha512&&f!==i.oids["sha512-224"]&&f!==i.oids["sha512-256"])throw(u=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=f,u;if((f===i.oids.md2||f===i.oids.md5)&&!("parameters"in o))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return t===o.digest}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(t,e){return t===v(e,r,!0)}});var o=h.rsa.decrypt(e,r,!0,!1);return n.verify(t,o,r.n.bitLength())}};return r},h.setRsaPrivateKey=h.rsa.setPrivateKey=function(t,e,r,n,a,s,o,u){var f={n:t,e,d:r,p:n,q:a,dP:s,dQ:o,qInv:u,decrypt:function(t,e,r){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var n=h.rsa.decrypt(t,f,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:v};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return i.pkcs1.decode_rsa_oaep(e,t,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(n,f,!1)},sign:function(t,e){var r=!1;"string"==typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:m},r=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},r=1);var i=e.encode(t,f.n.bitLength());return h.rsa.encrypt(i,f,r)}};return f},h.wrapRsaPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(h.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(t).getBytes())])},h.privateKeyFromAsn1=function(t){var e,r,a,o,u,c,d,p,m={},g=[];if(s.validate(t,f,m,g)&&(t=s.fromDer(i.util.createBuffer(m.privateKey))),m={},g=[],!s.validate(t,l,m,g)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=g,y}return e=i.util.createBuffer(m.privateKeyModulus).toHex(),r=i.util.createBuffer(m.privateKeyPublicExponent).toHex(),a=i.util.createBuffer(m.privateKeyPrivateExponent).toHex(),o=i.util.createBuffer(m.privateKeyPrime1).toHex(),u=i.util.createBuffer(m.privateKeyPrime2).toHex(),c=i.util.createBuffer(m.privateKeyExponent1).toHex(),d=i.util.createBuffer(m.privateKeyExponent2).toHex(),p=i.util.createBuffer(m.privateKeyCoefficient).toHex(),h.setRsaPrivateKey(new n(e,16),new n(r,16),new n(a,16),new n(o,16),new n(u,16),new n(c,16),new n(d,16),new n(p,16))},h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.qInv))])},h.publicKeyFromAsn1=function(t){var e={},r=[];if(s.validate(t,d,e,r)){var a,o=s.derToOid(e.publicKeyOid);if(o!==h.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=o,a;t=e.rsaPublicKey}if(r=[],!s.validate(t,c,e,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var u=i.util.createBuffer(e.publicKeyModulus).toHex(),f=i.util.createBuffer(e.publicKeyExponent).toHex();return h.setRsaPublicKey(new n(u,16),new n(f,16))},h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(h.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[h.publicKeyToRSAPublicKey(t)])])},h.publicKeyToRSAPublicKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(t.e))])}},5892:(t,e,r)=>{var i=r(2861).Buffer,n=i.alloc(16,0);function a(t){var e=i.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,i=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],n=[0,0,0,0],s=-1;++s<128;){for(!!(this.state[~~(s/8)]&1<<7-s%8)&&(n[0]^=i[0],n[1]^=i[1],n[2]^=i[2],n[3]^=i[3]),r=!!(1&i[3]),e=3;e>0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=a(n)},s.prototype.update=function(t){var e;for(this.cache=i.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(a([0,t,0,e])),this.state},t.exports=s},5896:(t,e,r)=>{"use strict";var i=r(5606);function n(t,e){s(t,e),a(t)}function a(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return o||h?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(s,this,t)):i.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?i.nextTick(a,r):(r._writableState.errorEmitted=!0,i.nextTick(n,r,t)):i.nextTick(n,r,t):e?(i.nextTick(a,r),e(t)):i.nextTick(a,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}}},6011:(t,e,r)=>{"use strict";var i=r(8287).Buffer,n=r(6698),a=r(4729),s=new Array(16),o=[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],h=[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],u=[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],f=[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],l=[0,1518500249,1859775393,2400959708,2840853838],c=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,r,i,n,a,s,o){return p(t+(e^r^i)+a+s|0,o)+n|0}function g(t,e,r,i,n,a,s,o){return p(t+(e&r|~e&i)+a+s|0,o)+n|0}function y(t,e,r,i,n,a,s,o){return p(t+((e|~r)^i)+a+s|0,o)+n|0}function v(t,e,r,i,n,a,s,o){return p(t+(e&i|r&~i)+a+s|0,o)+n|0}function b(t,e,r,i,n,a,s,o){return p(t+(e^(r|~i))+a+s|0,o)+n|0}n(d,a),d.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,w=0|this._a,M=0|this._b,_=0|this._c,S=0|this._d,E=0|this._e,C=0;C<80;C+=1){var A,T;C<16?(A=m(r,i,n,a,d,t[o[C]],l[0],u[C]),T=b(w,M,_,S,E,t[h[C]],c[0],f[C])):C<32?(A=g(r,i,n,a,d,t[o[C]],l[1],u[C]),T=v(w,M,_,S,E,t[h[C]],c[1],f[C])):C<48?(A=y(r,i,n,a,d,t[o[C]],l[2],u[C]),T=y(w,M,_,S,E,t[h[C]],c[2],f[C])):C<64?(A=v(r,i,n,a,d,t[o[C]],l[3],u[C]),T=g(w,M,_,S,E,t[h[C]],c[3],f[C])):(A=b(r,i,n,a,d,t[o[C]],l[4],u[C]),T=m(w,M,_,S,E,t[h[C]],c[4],f[C])),r=d,d=a,a=p(n,10),n=i,i=A,w=E,E=S,S=p(_,10),_=M,M=T}var B=this._b+n+S|0;this._b=this._c+a+E|0,this._c=this._d+d+w|0,this._d=this._e+r+M|0,this._e=this._a+i+_|0,this._a=B},d.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 t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},6048:t=>{"use strict";var e={};function r(t,r,i){i||(i=Error);var n=function(t){var e,i;function n(e,i,n){return t.call(this,function(t,e,i){return"string"==typeof r?r:r(t,e,i)}(e,i,n))||this}return i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n}(i);n.prototype.name=i.name,n.prototype.code=t,e[t]=n}function i(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,a,s,o,h;if("string"==typeof e&&(a="not ",e.substr(0,4)===a)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))s="The ".concat(t," ").concat(n," ").concat(i(e,"type"));else{var u=("number"!=typeof h&&(h=0),h+1>(o=t).length||-1===o.indexOf(".",h)?"argument":"property");s='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(i(e,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=e},6089:()=>{},6166:(t,e,r)=>{"use strict";var i=r(7426),n=r(3349);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=a,a.prototype.update=function(t,e){if(t=i.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},a.prototype.digest=function(t){return this.update(this._pad()),n(null===this.pending),this._digest(t)},a.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(t<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=t>>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,a=8;a<this.padLength;a++)i[n++]=0;return i}},6168:(t,e,r)=>{"use strict";var i=r(2861).Buffer,n=r(8310).Transform,a=r(3141).I;function s(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(6698)(s,n);var o="undefined"!=typeof Uint8Array,h="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(i.prototype instanceof Uint8Array||i.TYPED_ARRAY_SUPPORT);s.prototype.update=function(t,e,r){var n=function(t,e){if(t instanceof i)return t;if("string"==typeof t)return i.from(t,e);if(h&&ArrayBuffer.isView(t)){if(0===t.byteLength)return i.alloc(0);var r=i.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(o&&t instanceof Uint8Array)return i.from(t);if(i.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return i.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,e),a=this._update(n);return this.hashMode?this:(r&&(a=this._toString(a,r)),a)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){i=t}finally{r(i)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can’t switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i},t.exports=s},6171:(t,e,r)=>{var i=r(2356),n=r(2861).Buffer,a=r(530),s=r(650),o=r(6168),h=r(462),u=r(8078);function f(t,e,r){o.call(this),this._cache=new l,this._last=void 0,this._cipher=new h.AES(e),this._prev=n.from(r),this._mode=t,this._autopadding=!0}function l(){this.cache=n.allocUnsafe(0)}function c(t,e,r){var o=a[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=n.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=n.from(e)),e.length!==o.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===o.type?new s(o.module,e,r,!0):"auth"===o.type?new i(o.module,e,r,!0):new f(o.module,e,r)}r(6698)(f,o),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return n.concat(i)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=n.concat([this.cache,t])},l.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=a[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=u(e,!1,r.key,r.iv);return c(t,i.key,i.iv)},e.createDecipheriv=c},6225:(t,e,r)=>{"use strict";var i=r(7426).rotr32;function n(t,e,r){return t&e^~t&r}function a(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,i){return 0===t?n(e,r,i):1===t||3===t?s(e,r,i):2===t?a(e,r,i):void 0},e.ch32=n,e.maj32=a,e.p32=s,e.s0_256=function(t){return i(t,2)^i(t,13)^i(t,22)},e.s1_256=function(t){return i(t,6)^i(t,11)^i(t,25)},e.g0_256=function(t){return i(t,7)^i(t,18)^t>>>3},e.g1_256=function(t){return i(t,17)^i(t,19)^t>>>10}},6229:(t,e,r)=>{"use strict";e.sha1=r(3917),e.sha224=r(7714),e.sha256=r(2287),e.sha384=r(1911),e.sha512=r(7766)},6238:(t,e,r)=>{"use strict";var i=r(6048).F.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function t(e,r,a){if("function"==typeof r)return t(e,null,r);r||(r={}),a=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}(a||n);var s=r.readable||!1!==r.readable&&e.readable,o=r.writable||!1!==r.writable&&e.writable,h=function(){e.writable||f()},u=e._writableState&&e._writableState.finished,f=function(){o=!1,u=!0,s||a.call(e)},l=e._readableState&&e._readableState.endEmitted,c=function(){s=!1,l=!0,o||a.call(e)},d=function(t){a.call(e,t)},p=function(){var t;return s&&!l?(e._readableState&&e._readableState.ended||(t=new i),a.call(e,t)):o&&!u?(e._writableState&&e._writableState.ended||(t=new i),a.call(e,t)):void 0},m=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",p),e.req?m():e.on("request",m)):o&&!e._writableState&&(e.on("end",h),e.on("close",h)),e.on("end",c),e.on("finish",f),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",f),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",f),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("end",c),e.removeListener("error",d),e.removeListener("close",p)}}},6248:(t,e,r)=>{"use strict";var i=r(3225),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var a=Object.create(r(5622));a.inherits=r(6698);var s=r(206),o=r(7314);a.inherits(l,s);for(var h=n(o.prototype),u=0;u<h.length;u++){var f=h[u];l.prototype[f]||(l.prototype[f]=o.prototype[f])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),o.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||i.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),i.nextTick(e,t)}},6278:(t,e,r)=>{"use strict";var i=r(3225);function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,t)):i.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,i.nextTick(n,r,t)):i.nextTick(n,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},6370:(t,e,r)=>{var i=r(276);r(7619),i.cipher=i.cipher||{};var n=t.exports=i.cipher.modes=i.cipher.modes||{};function a(t,e){if("string"==typeof t&&(t=i.util.createBuffer(t)),i.util.isArray(t)&&t.length>4){var r=t;t=i.util.createBuffer();for(var n=0;n<r.length;++n)t.putByte(r[n])}if(t.length()<e)throw new Error("Invalid IV length; got "+t.length()+" bytes and expected "+e+" bytes.");if(!i.util.isArray(t)){var a=[],s=e/4;for(n=0;n<s;++n)a.push(t.getInt32());t=a}return t}function s(t){t[t.length-1]=t[t.length-1]+1&4294967295}function o(t){return[t/4294967296|0,4294967295&t]}n.ecb=function(t){t=t||{},this.name="ECB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},n.ecb.prototype.start=function(t){},n.ecb.prototype.encrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._outBlock[i])},n.ecb.prototype.decrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._outBlock[i])},n.ecb.prototype.pad=function(t,e){var r=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(r,r),!0},n.ecb.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var r=t.length(),i=t.at(r-1);return!(i>this.blockSize<<2||(t.truncate(i),0))},n.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},n.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._prev=this._iv.slice(0)}},n.cbc.prototype.encrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=this._prev[i]^t.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._outBlock[i]);this._prev=this._outBlock},n.cbc.prototype.decrypt=function(t,e,r){if(t.length()<this.blockSize&&!(r&&t.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=t.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),i=0;i<this._ints;++i)e.putInt32(this._prev[i]^this._outBlock[i]);this._prev=this._inBlock.slice(0)},n.cbc.prototype.pad=function(t,e){var r=t.length()===this.blockSize?this.blockSize:this.blockSize-t.length();return t.fillWithByte(r,r),!0},n.cbc.prototype.unpad=function(t,e){if(e.overflow>0)return!1;var r=t.length(),i=t.at(r-1);return!(i>this.blockSize<<2||(t.truncate(i),0))},n.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0},n.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},n.cfb.prototype.encrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)this._inBlock[n]=t.getInt32()^this._outBlock[n],e.putInt32(this._inBlock[n]);else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialBlock[n]=t.getInt32()^this._outBlock[n],this._partialOutput.putInt32(this._partialBlock[n]);if(a>0)t.read-=this.blockSize;else for(n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}},n.cfb.prototype.decrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)this._inBlock[n]=t.getInt32(),e.putInt32(this._inBlock[n]^this._outBlock[n]);else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialBlock[n]=t.getInt32(),this._partialOutput.putInt32(this._partialBlock[n]^this._outBlock[n]);if(a>0)t.read-=this.blockSize;else for(n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}},n.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0},n.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},n.ofb.prototype.encrypt=function(t,e,r){var i=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)e.putInt32(t.getInt32()^this._outBlock[n]),this._inBlock[n]=this._outBlock[n];else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialOutput.putInt32(t.getInt32()^this._outBlock[n]);if(a>0)t.read-=this.blockSize;else for(n=0;n<this._ints;++n)this._inBlock[n]=this._outBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}},n.ofb.prototype.decrypt=n.ofb.prototype.encrypt,n.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0},n.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},n.ctr.prototype.encrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize)for(var n=0;n<this._ints;++n)e.putInt32(t.getInt32()^this._outBlock[n]);else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialOutput.putInt32(t.getInt32()^this._outBlock[n]);if(a>0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},n.ctr.prototype.decrypt=n.ctr.prototype.encrypt,n.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=i.util.createBuffer(),this._partialBytes=0,this._R=3774873600},n.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,r=i.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?i.util.createBuffer(t.additionalData):i.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=i.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=r.length();if(12===n)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(o(8*n)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,e=i.util.createBuffer(e),this._aDataLength=o(8*e.length());var a=e.length()%this.blockSize;for(a&&e.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},n.gcm.prototype.encrypt=function(t,e,r){var i=t.length();if(0===i)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&i>=this.blockSize){for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]^=t.getInt32());this._cipherLength+=this.blockSize}else{var a=(this.blockSize-i)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),n=0;n<this._ints;++n)this._partialOutput.putInt32(t.getInt32()^this._outBlock[n]);if(a<=0||r){if(r){var o=i%this.blockSize;this._cipherLength+=o,this._partialOutput.truncate(this.blockSize-o)}else this._cipherLength+=this.blockSize;for(n=0;n<this._ints;++n)this._outBlock[n]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},n.gcm.prototype.decrypt=function(t,e,r){var i=t.length();if(i<this.blockSize&&!(r&&i>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]^this._hashBlock[n]);i<this.blockSize?this._cipherLength+=i%this.blockSize:this._cipherLength+=this.blockSize},n.gcm.prototype.afterFinish=function(t,e){var r=!0;e.decrypt&&e.overflow&&t.truncate(this.blockSize-e.overflow),this.tag=i.util.createBuffer();var n=this._aDataLength.concat(o(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,n);var a=[];this.cipher.encrypt(this._j0,a);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^a[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},n.gcm.prototype.multiply=function(t,e){for(var r=[0,0,0,0],i=e.slice(0),n=0;n<128;++n)t[n/32|0]&1<<31-n%32&&(r[0]^=i[0],r[1]^=i[1],r[2]^=i[2],r[3]^=i[3]),this.pow(i,i);return r},n.gcm.prototype.pow=function(t,e){for(var r=1&t[3],i=3;i>0;--i)e[i]=t[i]>>>1|(1&t[i-1])<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)},n.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var i=t[r/8|0]>>>4*(7-r%8)&15,n=this._m[r][i];e[0]^=n[0],e[1]^=n[1],e[2]^=n[2],e[3]^=n[3]}return e},n.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)},n.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,i=4*r,n=16*r,a=new Array(n),s=0;s<n;++s){var o=[0,0,0,0],h=(i-1-s%i)*e;o[s/i|0]=1<<e-1<<h,a[s]=this.generateSubHashTable(this.multiply(o,t),e)}return a},n.gcm.prototype.generateSubHashTable=function(t,e){var r=1<<e,i=r>>>1,n=new Array(r);n[i]=t.slice(0);for(var a=i>>>1;a>0;)this.pow(n[2*a],n[a]=[]),a>>=1;for(a=2;a<i;){for(var s=1;s<a;++s){var o=n[a],h=n[s];n[a+s]=[o[0]^h[0],o[1]^h[1],o[2]^h[2],o[3]^h[3]]}a*=2}for(n[0]=[0,0,0,0],a=i+1;a<r;++a){var u=n[a^i];n[a]=[t[0]^u[0],t[1]^u[1],t[2]^u[2],t[3]^u[3]]}return n}},6383:(t,e,r)=>{var i=r(2861).Buffer,n=r(295);function a(t,e,r){var a=e.length,s=n(e,t._cache);return t._cache=t._cache.slice(a),t._prev=i.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var n,s=i.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=i.allocUnsafe(0)),!(t._cache.length<=e.length)){s=i.concat([s,a(t,e,r)]);break}n=t._cache.length,s=i.concat([s,a(t,e.slice(0,n),r)]),e=e.slice(n)}return s}},6413:(t,e,r)=>{"use strict";var i=r(7568),n=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),h=i.define("RelativeDistinguishedName",(function(){this.setof(a)})),u=i.define("RDNSequence",(function(){this.seqof(h)})),f=i.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),l=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),c=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional())})),p=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=p},6418:(t,e,r)=>{var i=r(276);i.pki=i.pki||{};var n=t.exports=i.pki.oids=i.oids=i.oids||{};function a(t,e){n[t]=e,n[e]=t}function s(t,e){n[t]=e}a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRSAEncryption"),a("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),a("1.2.840.113549.1.1.7","RSAES-OAEP"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.9","pSpecified"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),a("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),a("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),a("1.3.101.112","EdDSA25519"),a("1.2.840.10040.4.3","dsa-with-sha1"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("1.3.14.3.2.29","sha1WithRSASignature"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("2.16.840.1.101.3.4.2.4","sha224"),a("2.16.840.1.101.3.4.2.5","sha512-224"),a("2.16.840.1.101.3.4.2.6","sha512-256"),a("1.2.840.113549.2.2","md2"),a("1.2.840.113549.2.5","md5"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),a("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),a("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),a("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),a("1.2.840.113549.2.7","hmacWithSHA1"),a("1.2.840.113549.2.8","hmacWithSHA224"),a("1.2.840.113549.2.9","hmacWithSHA256"),a("1.2.840.113549.2.10","hmacWithSHA384"),a("1.2.840.113549.2.11","hmacWithSHA512"),a("1.2.840.113549.3.7","des-EDE3-CBC"),a("2.16.840.1.101.3.4.1.2","aes128-CBC"),a("2.16.840.1.101.3.4.1.22","aes192-CBC"),a("2.16.840.1.101.3.4.1.42","aes256-CBC"),a("2.5.4.3","commonName"),a("2.5.4.4","surname"),a("2.5.4.5","serialNumber"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.9","streetAddress"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.12","title"),a("2.5.4.13","description"),a("2.5.4.15","businessCategory"),a("2.5.4.17","postalCode"),a("2.5.4.42","givenName"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),a("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping")},6427:(t,e,r)=>{"use strict";var i=r(8393).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.I=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=s(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||-2===n?0:(n=s(e[i]))>=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},6473:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6089).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,P=x>>>13,D=0|s[9],O=8191&D,j=D>>>13,K=0|o[0],q=8191&K,V=K>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(P,q)|0,a=Math.imul(P,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(j,q)|0,a=Math.imul(j,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(P,z)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(j,z)|0,a=Math.imul(j,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(j,Z)|0,a=Math.imul(j,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(j,Y)|0,a=Math.imul(j,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(j,rt)|0,a=Math.imul(j,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(j,at)|0,a=Math.imul(j,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(P,ht)|0,a=a+Math.imul(P,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(j,ht)|0,a=Math.imul(j,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(j,pt)|0))<<13)|0;return u=((a=Math.imul(j,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6661:(t,e,r)=>{"use strict";var i=r(7011),n=i.assert,a=i.parseBytes,s=i.cachedProperty;function o(t,e){this.eddsa=t,this._secret=a(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=a(e.pub)}o.fromPublic=function(t,e){return e instanceof o?e:new o(t,{pub:e})},o.fromSecret=function(t,e){return e instanceof o?e:new o(t,{secret:e})},o.prototype.secret=function(){return this._secret},s(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(o,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,i=e.slice(0,t.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),s(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(t){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},o.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},o.prototype.getSecret=function(t){return n(this._secret,"KeyPair is public only"),i.encode(this.secret(),t)},o.prototype.getPublic=function(t){return i.encode(this.pubBytes(),t)},t.exports=o},6677:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011),a=n.getNAF,s=n.getJSF,o=n.assert;function h(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;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 u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=h,h.prototype.point=function(){throw new Error("Not implemented")},h.prototype.validate=function(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function(t,e){o(t.precomputed);var r=t._getDoubles(),i=a(e,1,this._bitLength),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;var s,h,u=[];for(s=0;s<i.length;s+=r.step){h=0;for(var f=s+r.step-1;f>=s;f--)h=(h<<1)+i[f];u.push(h)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=n;d>0;d--){for(s=0;s<u.length;s++)(h=u[s])===d?c=c.mixedAdd(r.points[s]):h===-d&&(c=c.mixedAdd(r.points[s].neg()));l=l.add(c)}return l.toP()},h.prototype._wnafMul=function(t,e){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var n=i.points,s=a(e,r,this._bitLength),h=this.jpoint(null,null,null),u=s.length-1;u>=0;u--){for(var f=0;u>=0&&0===s[u];u--)f++;if(u>=0&&f++,h=h.dblp(f),u<0)break;var l=s[u];o(0!==l),h="affine"===t.type?l>0?h.mixedAdd(n[l-1>>1]):h.mixedAdd(n[-l-1>>1].neg()):l>0?h.add(n[l-1>>1]):h.add(n[-l-1>>1].neg())}return"affine"===t.type?h.toP():h},h.prototype._wnafMulAdd=function(t,e,r,i,n){var o,h,u,f=this._wnafT1,l=this._wnafT2,c=this._wnafT3,d=0;for(o=0;o<i;o++){var p=(u=e[o])._getNAFPoints(t);f[o]=p.wnd,l[o]=p.points}for(o=i-1;o>=1;o-=2){var m=o-1,g=o;if(1===f[m]&&1===f[g]){var y=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(y[1]=e[m].add(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].add(e[g].neg())):(y[1]=e[m].toJ().mixedAdd(e[g]),y[2]=e[m].toJ().mixedAdd(e[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=s(r[m],r[g]);for(d=Math.max(b[0].length,d),c[m]=new Array(d),c[g]=new Array(d),h=0;h<d;h++){var w=0|b[0][h],M=0|b[1][h];c[m][h]=v[3*(w+1)+(M+1)],c[g][h]=0,l[m]=y}}else c[m]=a(r[m],f[m],this._bitLength),c[g]=a(r[g],f[g],this._bitLength),d=Math.max(c[m].length,d),d=Math.max(c[g].length,d)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(o=d;o>=0;o--){for(var E=0;o>=0;){var C=!0;for(h=0;h<i;h++)S[h]=0|c[h][o],0!==S[h]&&(C=!1);if(!C)break;E++,o--}if(o>=0&&E++,_=_.dblp(E),o<0)break;for(h=0;h<i;h++){var A=S[h];0!==A&&(A>0?u=l[h][A-1>>1]:A<0&&(u=l[h][-A-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(o=0;o<i;o++)l[o]=null;return n?_:_.toP()},h.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},h.prototype.decodePoint=function(t,e){t=n.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?o(t[t.length-1]%2==0):7===t[0]&&o(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},u.prototype.encode=function(t,e){return n.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<e;n+=t){for(var a=0;a<t;a++)i=i.dbl();r.push(i)}return{step:t,points:r}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)e[n]=e[n-1].add(i);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},6708:(t,e,r)=>{"use strict";var i,n=r(5606);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=C,C.WritableState=E;var s,o={deprecate:r(4643)},h=r(345),u=r(8287).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(5896),c=r(5291).getHighWaterMark,d=r(6048).F,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,M=d.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;function S(){}function E(t,e,s){i=i||r(5382),t=t||{},"boolean"!=typeof s&&(s=e instanceof i),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=c(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,a=r.writecb;if("function"!=typeof a)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,a){--e.pendingcb,r?(n.nextTick(a,i),n.nextTick(R,t,e),t._writableState.errorEmitted=!0,_(t,i)):(a(i),t._writableState.errorEmitted=!0,_(t,i),R(t,e))}(t,r,i,e,a);else{var s=I(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),i?n.nextTick(T,t,r,s,a):T(t,r,s,a)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function C(t){var e=this instanceof(i=i||r(5382));if(!e&&!s.call(C,this))return new C(t);this._writableState=new E(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function A(t,e,r,i,n,a,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new v("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function T(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),R(t,e)}function B(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,h=!0;r;)n[o]=r,r.isBuf||(h=!1),r=r.next,o+=1;n.allBuffers=h,A(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(A(t,e,!1,e.objectMode?1:u.length,u,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(r){e.pendingcb--,r&&_(t,r),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var r=I(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(6698)(C,h),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===C&&t&&t._writableState instanceof E}})):s=function(t){return t instanceof this},C.prototype.pipe=function(){_(this,new y)},C.prototype.write=function(t,e,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=t,u.isBuffer(i)||i instanceof f);return o&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof r&&(r=S),a.ending?function(t,e){var r=new w;_(t,r),n.nextTick(e,r)}(this,r):(o||function(t,e,r,i){var a;return null===r?a=new b:"string"==typeof r||e.objectMode||(a=new p("chunk",["string","Buffer"],r)),!a||(_(t,a),n.nextTick(i,a),!1)}(this,a,t,r))&&(a.pendingcb++,s=function(t,e,r,i,n,a){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r)),e}(e,i,n);i!==s&&(r=!0,n="buffer",i=s)}var o=e.objectMode?1:i.length;e.length+=o;var h=e.length<e.highWaterMark;if(h||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else A(t,e,!1,o,i,n,a);return h}(this,a,o,t,e,r)),s},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||B(this,t))},C.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new M(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(t,e,r){r(new m("_write()"))},C.prototype._writev=null,C.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,R(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),C.prototype.destroy=l.destroy,C.prototype._undestroy=l.undestroy,C.prototype._destroy=function(t,e){e(t)}},6710:(t,e,r)=>{var i=r(6698),n=r(4107),a=r(392),s=r(2861).Buffer,o=new Array(64);function h(){this.init(),this._w=o,a.call(this,64,56)}i(h,n),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=h},6729:(t,e,r)=>{"use strict";var i=e;i.version=r(1636).rE,i.utils=r(7011),i.rand=r(5037),i.curve=r(894),i.curves=r(480),i.ec=r(7447),i.eddsa=r(8650)},6737:(t,e,r)=>{(e=t.exports=r(206)).Stream=e,e.Readable=e,e.Writable=r(7314),e.Duplex=r(6248),e.Transform=r(1816),e.PassThrough=r(5242)},6784:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=i.rotl32,s=i.sum32,o=i.sum32_3,h=i.sum32_4,u=n.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function c(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}i.inherits(f,u),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],i=this.h[1],n=this.h[2],u=this.h[3],f=this.h[4],v=r,b=i,w=n,M=u,_=f,S=0;S<80;S++){var E=s(a(h(r,l(S,i,n,u),t[p[S]+e],c(S)),g[S]),f);r=f,f=u,u=a(n,10),n=i,i=E,E=s(a(h(v,l(79-S,b,w,M),t[m[S]+e],d(S)),y[S]),_),v=_,_=M,M=a(w,10),w=b,b=E}E=o(this.h[1],n,M),this.h[1]=o(this.h[2],u,_),this.h[2]=o(this.h[3],f,v),this.h[3]=o(this.h[4],r,b),this.h[4]=o(this.h[0],i,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var p=[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],m=[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],g=[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],y=[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]},6843:(t,e,r)=>{var i=r(8287).Buffer,n=r(295);function a(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=i.concat([t._cache,a(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,r)}},6975:(t,e,r)=>{var i=r(2861).Buffer;function n(t,e,r){var n=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=i.concat([t._prev.slice(1),i.from([r?e:n])]),n}e.encrypt=function(t,e,r){for(var a=e.length,s=i.allocUnsafe(a),o=-1;++o<a;)s[o]=n(t,e[o],r);return s}},6983:(t,e,r)=>{"use strict";var i=r(5606);function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=r(2861),s=r(3209),o=a.Buffer,h=a.kMaxLength,u=r.g.crypto||r.g.msCrypto,f=Math.pow(2,32)-1;function l(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>h||t>e)throw new RangeError("offset out of range")}function c(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>h)throw new RangeError("buffer too small")}function d(t,e,r,n){if(i.browser){var a=t.buffer,o=new Uint8Array(a,e,r);return u.getRandomValues(o),n?void i.nextTick((function(){n(null,t)})):t}if(!n)return s(r).copy(t,e),t;s(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}u&&u.getRandomValues||!i.browser?(e.randomFill=function(t,e,i,n){if(!(o.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)n=e,e=0,i=t.length;else if("function"==typeof i)n=i,i=t.length-e;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return l(e,t.length),c(i,e,t.length),d(t,e,i,n)},e.randomFillSync=function(t,e,i){if(void 0===e&&(e=0),!(o.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return l(e,t.length),void 0===i&&(i=t.length-e),c(i,e,t.length),d(t,e,i)}):(e.randomFill=n,e.randomFillSync=n)},7007:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,i){function n(r){t.removeListener(e,a),i(r)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",n),r([].slice.call(arguments))}m(t,e,a,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,n)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function h(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,r,i){var n,a,s,u;if(o(r),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),s=a[e]),void 0===s)s=a[e]=r,++t._eventsCount;else if("function"==typeof s?s=a[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=h(t))>0&&s.length>n&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,u=f,console&&console.warn&&console.warn(u)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=f.bind(i);return n.listener=r,i.wrapFn=n,n}function c(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):p(n,n.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function m(t,e,r,i){if("function"==typeof t.on)i.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function n(a){i.once&&t.removeEventListener(e,n),r(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||n(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||n(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return h(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,a=this._events;if(void 0!==a)n=n&&void 0===a.error;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var h=a[t];if(void 0===h)return!1;if("function"==typeof h)i(h,this,e);else{var u=h.length,f=p(h,u);for(r=0;r<u;++r)i(f[r],this,e)}return!0},a.prototype.addListener=function(t,e){return u(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return u(this,t,e,!0)},a.prototype.once=function(t,e){return o(e),this.on(t,l(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return o(e),this.prependListener(t,l(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,i,n,a,s;if(o(e),void 0===(i=this._events))return this;if(void 0===(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(n=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){s=r[a].listener,n=a;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n),1===r.length&&(i[t]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var n,a=Object.keys(r);for(i=0;i<a.length;++i)"removeListener"!==(n=a[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return c(this,t,!0)},a.prototype.rawListeners=function(t){return c(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},7011:(t,e,r)=>{"use strict";var i=e,n=r(8490),a=r(3349),s=r(4367);i.assert=a,i.toArray=s.toArray,i.zero2=s.zero2,i.toHex=s.toHex,i.encode=s.encode,i.getNAF=function(t,e,r){var i,n=new Array(Math.max(t.bitLength(),r)+1);for(i=0;i<n.length;i+=1)n[i]=0;var a=1<<e+1,s=t.clone();for(i=0;i<n.length;i++){var o,h=s.andln(a-1);s.isOdd()?(o=h>(a>>1)-1?(a>>1)-h:h,s.isubn(o)):o=0,n[i]=o,s.iushrn(1)}return n},i.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i,n=0,a=0;t.cmpn(-n)>0||e.cmpn(-a)>0;){var s,o,h=t.andln(3)+n&3,u=e.andln(3)+a&3;3===h&&(h=-1),3===u&&(u=-1),s=1&h?3!=(i=t.andln(7)+n&7)&&5!==i||2!==u?h:-h:0,r[0].push(s),o=1&u?3!=(i=e.andln(7)+a&7)&&5!==i||2!==h?u:-u:0,r[1].push(o),2*n===s+1&&(n=1-n),2*a===o+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return r},i.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(t){return"string"==typeof t?i.toArray(t,"hex"):t},i.intFromLE=function(t){return new n(t,"hex","le")}},7108:(t,e,r)=>{"use strict";var i=r(6698),n=r(8276),a=r(6011),s=r(2802),o=r(6168);function h(t){o.call(this,"digest"),this._hash=t}i(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new n:"rmd160"===t||"ripemd160"===t?new a:new h(s(t))}},7168:(t,e,r)=>{e.publicEncrypt=r(8902),e.privateDecrypt=r(7362),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},7227:(t,e,r)=>{var i=r(6698),n=r(9673).Reporter,a=r(8287).Buffer;function s(t,e){n.call(this,e),a.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function o(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof o||(t=new o(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=a.byteLength(t);else{if(!a.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}i(s,n),e.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,n.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.d=o,o.prototype.join=function(t,e){return t||(t=new a(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):a.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},7314:(t,e,r)=>{"use strict";var i=r(5606),n=r(3225);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=y;var s,o=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?setImmediate:n.nextTick;y.WritableState=g;var h=Object.create(r(5622));h.inherits=r(6698);var u,f={deprecate:r(4643)},l=r(5567),c=r(4116).Buffer,d=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},p=r(6278);function m(){}function g(t,e){s=s||r(6248),t=t||{};var i=e instanceof s;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var h=t.highWaterMark,u=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=h||0===h?h:i&&(u||0===u)?u:f,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 l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,a=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,a){--e.pendingcb,r?(n.nextTick(a,i),n.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(a(i),t._writableState.errorEmitted=!0,t.emit("error",i),S(t,e))}(t,r,i,e,a);else{var s=M(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),i?o(b,t,r,s,a):b(t,r,s,a)}}(e,t)},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 a(this)}function y(t){if(s=s||r(6248),!(u.call(y,this)||this instanceof s))return new y(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function v(t,e,r,i,n,a,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function b(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,h=!0;r;)n[o]=r,r.isBuf||(h=!1),r=r.next,o+=1;n.allBuffers=h,v(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(v(t,e,!1,e.objectMode?1:u.length,u,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function _(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var r=M(e);return r&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,n.nextTick(_,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}h.inherits(y,l),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!u.call(this,t)||this===y&&t&&t._writableState instanceof g}})):u=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=t,c.isBuffer(i)||i instanceof d);return o&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof r&&(r=m),a.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),n.nextTick(e,r)}(this,r):(o||function(t,e,r,i){var a=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),n.nextTick(i,s),a=!1),a}(this,a,t,r))&&(a.pendingcb++,s=function(t,e,r,i,n,a){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r)),e}(e,i,n);i!==s&&(r=!0,n="buffer",i=s)}var o=e.objectMode?1:i.length;e.length+=o;var h=e.length<e.highWaterMark;if(h||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,o,i,n,a);return h}(this,a,o,t,e,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}},7332:(t,e,r)=>{"use strict";var i=r(9404),n=r(3209),a=r(2861).Buffer;function s(t){var e,r=t.modulus.byteLength();do{e=new i(n(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function o(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),n=e.modulus.byteLength(),o=new i(t).mul(r.blinder).umod(e.modulus),h=o.toRed(i.mont(e.prime1)),u=o.toRed(i.mont(e.prime2)),f=e.coefficient,l=e.prime1,c=e.prime2,d=h.redPow(e.exponent1).fromRed(),p=u.redPow(e.exponent2).fromRed(),m=d.isub(p).imul(f).umod(l).imul(c);return p.iadd(m).imul(r.unblinder).umod(e.modulus).toArrayLike(a,"be",n)}o.getr=s,t.exports=o},7362:(t,e,r)=>{var i=r(8170),n=r(8206),a=r(2061),s=r(2509),o=r(7332),h=r(7108),u=r(9247),f=r(2861).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var c,d=i(t),p=d.modulus.byteLength();if(e.length>p||new s(e).cmp(d.modulus)>=0)throw new Error("decryption error");c=r?u(new s(e),d):o(e,d);var m=f.alloc(p-c.length);if(c=f.concat([m,c],p),4===l)return function(t,e){var r=t.modulus.byteLength(),i=h("sha1").update(f.alloc(0)).digest(),s=i.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,s+1),u=e.slice(s+1),l=a(o,n(u,s)),c=a(u,n(l,r-s-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var n=-1;++n<i;)r+=t[n]^e[n];return r}(i,c.slice(0,s)))throw new Error("decryption error");for(var d=s;0===c[d];)d++;if(1!==c[d++])throw new Error("decryption error");return c.slice(d)}(d,c);if(1===l)return function(t,e,r){for(var i=e.slice(0,2),n=2,a=0;0!==e[n++];)if(n>=e.length){a++;break}var s=e.slice(2,n-1);if(("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&a++,s.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}(0,c,r);if(3===l)return c;throw new Error("unknown padding")}},7363:(t,e,r)=>{var i=r(7568),n=r(6698);function a(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new a(t,e)},a.prototype._createNamed=function(t){var e;try{e=r(8961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return n(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i.decoders[t])),this.decoders[t]},a.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(i.encoders[t])),this.encoders[t]},a.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},7426:(t,e,r)=>{"use strict";var i=r(3349),n=r(6698);function a(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=n,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var i=0,n=0;n<t.length;n++){var s=t.charCodeAt(n);s<128?r[i++]=s:s<2048?(r[i++]=s>>6|192,r[i++]=63&s|128):a(t,n)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++n)),r[i++]=s>>18|240,r[i++]=s>>12&63|128,r[i++]=s>>6&63|128,r[i++]=63&s|128):(r[i++]=s>>12|224,r[i++]=s>>6&63|128,r[i++]=63&s|128)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=o(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];"little"===e&&(n=s(n)),r+=h(n.toString(16))}return r},e.zero2=o,e.zero8=h,e.join32=function(t,e,r,n){var a=r-e;i(a%4==0);for(var s=new Array(a/4),o=0,h=e;o<s.length;o++,h+=4){var u;u="big"===n?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],s[o]=u>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),i=0,n=0;i<t.length;i++,n+=4){var a=t[i];"big"===e?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=255&a):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=255&a)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},e.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},e.sum64=function(t,e,r,i){var n=t[e],a=i+t[e+1]>>>0,s=(a<i?1:0)+r+n;t[e]=s>>>0,t[e+1]=a},e.sum64_hi=function(t,e,r,i){return(e+i>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,i){return e+i>>>0},e.sum64_4_hi=function(t,e,r,i,n,a,s,o){var h=0,u=e;return h+=(u=u+i>>>0)<e?1:0,h+=(u=u+a>>>0)<a?1:0,t+r+n+s+(h+=(u=u+o>>>0)<o?1:0)>>>0},e.sum64_4_lo=function(t,e,r,i,n,a,s,o){return e+i+a+o>>>0},e.sum64_5_hi=function(t,e,r,i,n,a,s,o,h,u){var f=0,l=e;return f+=(l=l+i>>>0)<e?1:0,f+=(l=l+a>>>0)<a?1:0,f+=(l=l+o>>>0)<o?1:0,t+r+n+s+h+(f+=(l=l+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,r,i,n,a,s,o,h,u){return e+i+a+o+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},7447:(t,e,r)=>{"use strict";var i=r(8490),n=r(2723),a=r(7011),s=r(480),o=r(5037),h=a.assert,u=r(1200),f=r(8545);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(h(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new u(this,t)},l.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new n({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new i(2));;){var s=new i(e.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},l.prototype._truncateToN=function(t,e,r){var n;if(i.isBN(t)||"number"==typeof t)n=(t=new i(t,16)).byteLength();else if("object"==typeof t)n=t.length,t=new i(t,16);else{var a=t.toString();n=a.length+1>>>1,t=new i(a,16)}"number"!=typeof r&&(r=8*n);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,r,a){if("object"==typeof r&&(a=r,r=null),a||(a={}),"string"!=typeof t&&"number"!=typeof t&&!i.isBN(t)){h("object"==typeof t&&t&&"number"==typeof t.length,"Expected message to be an array-like, a hex string, or a BN instance"),h(t.length>>>0===t.length);for(var s=0;s<t.length;s++)h((255&t[s])===t[s])}e=this.keyFromPrivate(e,r),t=this._truncateToN(t,!1,a.msgBitLength),h(!t.isNeg(),"Can not sign a negative message");var o=this.n.byteLength(),u=e.getPrivate().toArray("be",o),l=t.toArray("be",o);h(new i(l).eq(t),"Can not sign message");for(var c=new n({hash:this.hash,entropy:u,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new i(1)),p=0;;p++){var m=a.k?a.k(p):new i(c.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(d)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var y=g.getX(),v=y.umod(this.n);if(0!==v.cmpn(0)){var b=m.invm(this.n).mul(v.mul(e.getPrivate()).iadd(t));if(0!==(b=b.umod(this.n)).cmpn(0)){var w=(g.getY().isOdd()?1:0)|(0!==y.cmp(v)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),w^=1),new f({r:v,s:b,recoveryParam:w})}}}}}},l.prototype.verify=function(t,e,r,i,n){n||(n={}),t=this._truncateToN(t,!1,n.msgBitLength),r=this.keyFromPublic(r,i);var a=(e=new f(e,"hex")).r,s=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,h=s.invm(this.n),u=h.mul(t).umod(this.n),l=h.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},l.prototype.recoverPubKey=function(t,e,r,n){h((3&r)===r,"The recovery param is more than two bits"),e=new f(e,n);var a=this.n,s=new i(t),o=e.r,u=e.s,l=1&r,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),l):this.curve.pointFromX(o,l);var d=e.r.invm(a),p=a.sub(s).mul(d).umod(a),m=u.mul(d).umod(a);return this.g.mulAdd(p,o,m)},l.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new f(e,i)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(t,e,n)}catch(t){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},7501:(t,e,r)=>{var i=r(276);r(7619),r(9356),r(1598);var n=t.exports=i.pkcs1=i.pkcs1||{};function a(t,e,r){r||(r=i.md.sha1.create());for(var n="",a=Math.ceil(e/r.digestLength),s=0;s<a;++s){var o=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(t+o),n+=r.digest().getBytes()}return n.substring(0,e)}n.encode_rsa_oaep=function(t,e,r){var n,s,o,h;"string"==typeof r?(n=r,s=arguments[3]||void 0,o=arguments[4]||void 0):r&&(n=r.label||void 0,s=r.seed||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(h=r.mgf1.md)),o?o.start():o=i.md.sha1.create(),h||(h=o);var u=Math.ceil(t.n.bitLength()/8),f=u-2*o.digestLength-2;if(e.length>f)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=e.length,g.maxLength=f,g;n||(n=""),o.update(n,"raw");for(var l=o.digest(),c="",d=f-e.length,p=0;p<d;p++)c+="\0";var m=l.getBytes()+c+""+e;if(s){if(s.length!==o.digestLength){var g;throw(g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=s.length,g.digestLength=o.digestLength,g}}else s=i.random.getBytes(o.digestLength);var y=a(s,u-o.digestLength-1,h),v=i.util.xorBytes(m,y,m.length),b=a(v,o.digestLength,h);return"\0"+i.util.xorBytes(s,b,s.length)+v},n.decode_rsa_oaep=function(t,e,r){var n,s,o;"string"==typeof r?(n=r,s=arguments[3]||void 0):r&&(n=r.label||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(o=r.mgf1.md));var h=Math.ceil(t.n.bitLength()/8);if(e.length!==h)throw(y=new Error("RSAES-OAEP encoded message length is invalid.")).length=e.length,y.expectedLength=h,y;if(void 0===s?s=i.md.sha1.create():s.start(),o||(o=s),h<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),s.update(n,"raw");for(var u=s.digest().getBytes(),f=e.charAt(0),l=e.substring(1,s.digestLength+1),c=e.substring(1+s.digestLength),d=a(c,s.digestLength,o),p=a(i.util.xorBytes(l,d,l.length),h-s.digestLength-1,o),m=i.util.xorBytes(c,p,c.length),g=m.substring(0,s.digestLength),y="\0"!==f,v=0;v<s.digestLength;++v)y|=u.charAt(v)!==g.charAt(v);for(var b=1,w=s.digestLength,M=s.digestLength;M<m.length;M++){var _=m.charCodeAt(M);y|=_&(b?65534:0),w+=b&=1&_^1}if(y||1!==m.charCodeAt(w))throw new Error("Invalid RSAES-OAEP padding.");return m.substring(w+1)}},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=o(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,a=o(t),s=a[0],h=a[1],u=new n(function(t,e,r){return 3*(e+r)/4-r}(0,s,h)),f=0,l=h>0?s-4:s;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===h&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===h&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,a=[],s=16383,o=0,u=i-n;o<u;o+=s)a.push(h(t,o,o+s>u?u:o+s));return 1===n?(e=t[i-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function o(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,i){for(var n,a,s=[],o=e;o<i;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),s.push(r[(a=n)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},7568:(t,e,r)=>{var i=e;i.bignum=r(2344),i.define=r(7363).define,i.base=r(9673),i.constants=r(2153),i.decoders=r(2853),i.encoders=r(4669)},7619:(t,e,r)=>{var i=r(5606),n=r(8287).Buffer,a=r(276),s=r(4058),o=t.exports=a.util=a.util||{};function h(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}function u(t){if(this.data="",this.read=0,"string"==typeof t)this.data=t;else if(o.isArrayBuffer(t)||o.isArrayBufferView(t))if(void 0!==n&&t instanceof n)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(t){for(var r=0;r<e.length;++r)this.putByte(e[r])}}else(t instanceof u||"object"==typeof t&&"string"==typeof t.data&&"number"==typeof t.read)&&(this.data=t.data,this.read=t.read);this._constructedStringLength=0}!function(){if(void 0!==i&&i.nextTick&&!i.browser)return o.nextTick=i.nextTick,void("function"==typeof setImmediate?o.setImmediate=setImmediate:o.setImmediate=o.nextTick);if("function"==typeof setImmediate)return o.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(o.nextTick=function(t){return setImmediate(t)});if(o.setImmediate=function(t){setTimeout(t,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var t="forge.setImmediate",e=[];o.setImmediate=function(r){e.push(r),1===e.length&&window.postMessage(t,"*")},window.addEventListener("message",(function(r){if(r.source===window&&r.data===t){r.stopPropagation();var i=e.slice();e.length=0,i.forEach((function(t){t()}))}}),!0)}if("undefined"!=typeof MutationObserver){var r=Date.now(),n=!0,a=document.createElement("div");e=[],new MutationObserver((function(){var t=e.slice();e.length=0,t.forEach((function(t){t()}))})).observe(a,{attributes:!0});var s=o.setImmediate;o.setImmediate=function(t){Date.now()-r>15?(r=Date.now(),s(t)):(e.push(t),1===e.length&&a.setAttribute("a",n=!n))}}o.nextTick=o.setImmediate}(),o.isNodejs=void 0!==i&&i.versions&&i.versions.node,o.globalScope=o.isNodejs?r.g:"undefined"==typeof self?window:self,o.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},o.isArrayBufferView=function(t){return t&&o.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},o.ByteBuffer=u,o.ByteStringBuffer=u,o.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},o.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},o.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},o.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},o.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this},o.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},o.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(o.encodeUtf8(t))},o.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},o.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},o.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},o.ByteStringBuffer.prototype.putInt=function(t,e){h(e);var r="";do{e-=8,r+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(r)},o.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<<e-1),this.putInt(t,e)},o.ByteStringBuffer.prototype.putBuffer=function(t){return this.putBytes(t.getBytes())},o.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},o.ByteStringBuffer.prototype.getInt16=function(){var t=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,t},o.ByteStringBuffer.prototype.getInt24=function(){var t=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,t},o.ByteStringBuffer.prototype.getInt32=function(){var t=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,t},o.ByteStringBuffer.prototype.getInt16Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,t},o.ByteStringBuffer.prototype.getInt24Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,t},o.ByteStringBuffer.prototype.getInt32Le=function(){var t=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,t},o.ByteStringBuffer.prototype.getInt=function(t){h(t);var e=0;do{e=(e<<8)+this.data.charCodeAt(this.read++),t-=8}while(t>0);return e},o.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<<t-2;return e>=r&&(e-=r<<1),e},o.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.ByteStringBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},o.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},o.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},o.ByteStringBuffer.prototype.copy=function(){var t=o.createBuffer(this.data);return t.read=this.read,t},o.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},o.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},o.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},o.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.length;++e){var r=this.data.charCodeAt(e);r<16&&(t+="0"),t+=r.toString(16)}return t},o.ByteStringBuffer.prototype.toString=function(){return o.decodeUtf8(this.bytes())},o.DataBuffer=function(t,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var r=o.isArrayBuffer(t),i=o.isArrayBufferView(t);if(r||i)return this.data=r?new DataView(t):new DataView(t.buffer,t.byteOffset,t.byteLength),void(this.write="writeOffset"in e?e.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=t&&this.putBytes(t),"writeOffset"in e&&(this.write=e.writeOffset)},o.DataBuffer.prototype.length=function(){return this.write-this.read},o.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},o.DataBuffer.prototype.accommodate=function(t,e){if(this.length()>=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),i=new Uint8Array(this.length()+e);return i.set(r),this.data=new DataView(i.buffer),this},o.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},o.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r<e;++r)this.data.setUint8(t);return this},o.DataBuffer.prototype.putBytes=function(t,e){if(o.isArrayBufferView(t)){var r=(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).byteLength-i.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(i),this.write+=r,this}if(o.isArrayBuffer(t)){var i=new Uint8Array(t);return this.accommodate(i.byteLength),new Uint8Array(this.data.buffer).set(i,this.write),this.write+=i.byteLength,this}if(t instanceof o.DataBuffer||"object"==typeof t&&"number"==typeof t.read&&"number"==typeof t.write&&o.isArrayBufferView(t.data))return i=new Uint8Array(t.data.byteLength,t.read,t.length()),this.accommodate(i.byteLength),new Uint8Array(t.data.byteLength,this.write).set(i),this.write+=i.byteLength,this;if(t instanceof o.ByteStringBuffer&&(t=t.data,e="binary"),e=e||"binary","string"==typeof t){var n;if("hex"===e)return this.accommodate(Math.ceil(t.length/2)),n=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.hex.decode(t,n,this.write),this;if("base64"===e)return this.accommodate(3*Math.ceil(t.length/4)),n=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.base64.decode(t,n,this.write),this;if("utf8"===e&&(t=o.encodeUtf8(t),e="binary"),"binary"===e||"raw"===e)return this.accommodate(t.length),n=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.raw.decode(n),this;if("utf16"===e)return this.accommodate(2*t.length),n=new Uint16Array(this.data.buffer,this.write),this.write+=o.text.utf16.encode(n),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+t)},o.DataBuffer.prototype.putBuffer=function(t){return this.putBytes(t),t.clear(),this},o.DataBuffer.prototype.putString=function(t){return this.putBytes(t,"utf16")},o.DataBuffer.prototype.putInt16=function(t){return this.accommodate(2),this.data.setInt16(this.write,t),this.write+=2,this},o.DataBuffer.prototype.putInt24=function(t){return this.accommodate(3),this.data.setInt16(this.write,t>>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},o.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},o.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},o.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},o.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},o.DataBuffer.prototype.putInt=function(t,e){h(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},o.DataBuffer.prototype.putSignedInt=function(t,e){return h(e),this.accommodate(e/8),t<0&&(t+=2<<e-1),this.putInt(t,e)},o.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},o.DataBuffer.prototype.getInt16=function(){var t=this.data.getInt16(this.read);return this.read+=2,t},o.DataBuffer.prototype.getInt24=function(){var t=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,t},o.DataBuffer.prototype.getInt32=function(){var t=this.data.getInt32(this.read);return this.read+=4,t},o.DataBuffer.prototype.getInt16Le=function(){var t=this.data.getInt16(this.read,!0);return this.read+=2,t},o.DataBuffer.prototype.getInt24Le=function(){var t=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,t},o.DataBuffer.prototype.getInt32Le=function(){var t=this.data.getInt32(this.read,!0);return this.read+=4,t},o.DataBuffer.prototype.getInt=function(t){h(t);var e=0;do{e=(e<<8)+this.data.getInt8(this.read++),t-=8}while(t>0);return e},o.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<<t-2;return e>=r&&(e-=r<<1),e},o.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.DataBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},o.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},o.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},o.DataBuffer.prototype.copy=function(){return new o.DataBuffer(this)},o.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},o.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},o.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},o.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e<this.data.byteLength;++e){var r=this.data.getUint8(e);r<16&&(t+="0"),t+=r.toString(16)}return t},o.DataBuffer.prototype.toString=function(t){var e=new Uint8Array(this.data,this.read,this.length());if("binary"===(t=t||"utf8")||"raw"===t)return o.binary.raw.encode(e);if("hex"===t)return o.binary.hex.encode(e);if("base64"===t)return o.binary.base64.encode(e);if("utf8"===t)return o.text.utf8.decode(e);if("utf16"===t)return o.text.utf16.decode(e);throw new Error("Invalid encoding: "+t)},o.createBuffer=function(t,e){return e=e||"raw",void 0!==t&&"utf8"===e&&(t=o.encodeUtf8(t)),new o.ByteBuffer(t)},o.fillString=function(t,e){for(var r="";e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return r},o.xorBytes=function(t,e,r){for(var i="",n="",a="",s=0,o=0;r>0;--r,++s)n=t.charCodeAt(s)^e.charCodeAt(s),o>=10&&(i+=a,a="",o=0),a+=String.fromCharCode(n),++o;return i+a},o.hexToBytes=function(t){var e="",r=0;for(!0&t.length&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r<t.length;r+=2)e+=String.fromCharCode(parseInt(t.substr(r,2),16));return e},o.bytesToHex=function(t){return o.createBuffer(t).toHex()},o.int32ToBytes=function(t){return String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],c="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";o.encode64=function(t,e){for(var r,i,n,a="",s="",o=0;o<t.length;)r=t.charCodeAt(o++),i=t.charCodeAt(o++),n=t.charCodeAt(o++),a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|i>>4),isNaN(i)?a+="==":(a+=f.charAt((15&i)<<2|n>>6),a+=isNaN(n)?"=":f.charAt(63&n)),e&&a.length>e&&(s+=a.substr(0,e)+"\r\n",a=a.substr(e));return s+a},o.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,r,i,n,a="",s=0;s<t.length;)e=l[t.charCodeAt(s++)-43],r=l[t.charCodeAt(s++)-43],i=l[t.charCodeAt(s++)-43],n=l[t.charCodeAt(s++)-43],a+=String.fromCharCode(e<<2|r>>4),64!==i&&(a+=String.fromCharCode((15&r)<<4|i>>2),64!==n&&(a+=String.fromCharCode((3&i)<<6|n)));return a},o.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},o.decodeUtf8=function(t){return decodeURIComponent(escape(t))},o.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},o.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},o.binary.raw.decode=function(t,e,r){var i=e;i||(i=new Uint8Array(t.length));for(var n=r=r||0,a=0;a<t.length;++a)i[n++]=t.charCodeAt(a);return e?n-r:i},o.binary.hex.encode=o.bytesToHex,o.binary.hex.decode=function(t,e,r){var i=e;i||(i=new Uint8Array(Math.ceil(t.length/2)));var n=0,a=r=r||0;for(1&t.length&&(n=1,i[a++]=parseInt(t[0],16));n<t.length;n+=2)i[a++]=parseInt(t.substr(n,2),16);return e?a-r:i},o.binary.base64.encode=function(t,e){for(var r,i,n,a="",s="",o=0;o<t.byteLength;)r=t[o++],i=t[o++],n=t[o++],a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|i>>4),isNaN(i)?a+="==":(a+=f.charAt((15&i)<<2|n>>6),a+=isNaN(n)?"=":f.charAt(63&n)),e&&a.length>e&&(s+=a.substr(0,e)+"\r\n",a=a.substr(e));return s+a},o.binary.base64.decode=function(t,e,r){var i,n,a,s,o=e;o||(o=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var h=0,u=r=r||0;h<t.length;)i=l[t.charCodeAt(h++)-43],n=l[t.charCodeAt(h++)-43],a=l[t.charCodeAt(h++)-43],s=l[t.charCodeAt(h++)-43],o[u++]=i<<2|n>>4,64!==a&&(o[u++]=(15&n)<<4|a>>2,64!==s&&(o[u++]=(3&a)<<6|s));return e?u-r:o.subarray(0,u)},o.binary.base58.encode=function(t,e){return o.binary.baseN.encode(t,c,e)},o.binary.base58.decode=function(t,e){return o.binary.baseN.decode(t,c,e)},o.text={utf8:{},utf16:{}},o.text.utf8.encode=function(t,e,r){t=o.encodeUtf8(t);var i=e;i||(i=new Uint8Array(t.length));for(var n=r=r||0,a=0;a<t.length;++a)i[n++]=t.charCodeAt(a);return e?n-r:i},o.text.utf8.decode=function(t){return o.decodeUtf8(String.fromCharCode.apply(null,t))},o.text.utf16.encode=function(t,e,r){var i=e;i||(i=new Uint8Array(2*t.length));for(var n=new Uint16Array(i.buffer),a=r=r||0,s=r,o=0;o<t.length;++o)n[s++]=t.charCodeAt(o),a+=2;return e?a-r:i},o.text.utf16.decode=function(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))},o.deflate=function(t,e,r){if(e=o.decode64(t.deflate(o.encode64(e)).rval),r){var i=2;32&e.charCodeAt(1)&&(i=6),e=e.substring(i,e.length-4)}return e},o.inflate=function(t,e,r){var i=t.inflate(o.encode64(e)).rval;return null===i?null:o.decode64(i)};var d=function(t,e,r){if(!t)throw new Error("WebStorage not available.");var i;if(null===r?i=t.removeItem(e):(r=o.encode64(JSON.stringify(r)),i=t.setItem(e,r)),void 0!==i&&!0!==i.rval){var n=new Error(i.error.message);throw n.id=i.error.id,n.name=i.error.name,n}},p=function(t,e){if(!t)throw new Error("WebStorage not available.");var r=t.getItem(e);if(t.init)if(null===r.rval){if(r.error){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(o.decode64(r))),r},m=function(t,e,r,i){var n=p(t,e);null===n&&(n={}),n[r]=i,d(t,e,n)},g=function(t,e,r){var i=p(t,e);return null!==i&&(i=r in i?i[r]:null),i},y=function(t,e,r){var i=p(t,e);if(null!==i&&r in i){delete i[r];var n=!0;for(var a in i){n=!1;break}n&&(i=null),d(t,e,i)}},v=function(t,e){d(t,e,null)},b=function(t,e,r){var i,n=null;void 0===r&&(r=["web","flash"]);var a=!1,s=null;for(var o in r){i=r[o];try{if("flash"===i||"both"===i){if(null===e[0])throw new Error("Flash local storage not available.");n=t.apply(this,e),a="flash"===i}"web"!==i&&"both"!==i||(e[0]=localStorage,n=t.apply(this,e),a=!0)}catch(t){s=t}if(a)break}if(!a)throw s;return n};o.setItem=function(t,e,r,i,n){b(m,arguments,n)},o.getItem=function(t,e,r,i){return b(g,arguments,i)},o.removeItem=function(t,e,r,i){b(y,arguments,i)},o.clearItems=function(t,e,r){b(v,arguments,r)},o.isEmpty=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},o.format=function(t){for(var e,r,i=/%./g,n=0,a=[],s=0;e=i.exec(t);){(r=t.substring(s,i.lastIndex-2)).length>0&&a.push(r),s=i.lastIndex;var o=e[0][1];switch(o){case"s":case"o":n<arguments.length?a.push(arguments[1+n++]):a.push("<?>");break;case"%":a.push("%");break;default:a.push("<%"+o+"?>")}}return a.push(t.substring(s)),a.join("")},o.formatNumber=function(t,e,r,i){var n=t,a=isNaN(e=Math.abs(e))?2:e,s=void 0===r?",":r,o=void 0===i?".":i,h=n<0?"-":"",u=parseInt(n=Math.abs(+n||0).toFixed(a),10)+"",f=u.length>3?u.length%3:0;return h+(f?u.substr(0,f)+o:"")+u.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+o)+(a?s+Math.abs(n-u).toFixed(a).slice(2):"")},o.formatSize=function(t){return t>=1073741824?o.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?o.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?o.formatNumber(t/1024,0)+" KiB":o.formatNumber(t,0)+" bytes"},o.bytesFromIP=function(t){return-1!==t.indexOf(".")?o.bytesFromIPv4(t):-1!==t.indexOf(":")?o.bytesFromIPv6(t):null},o.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=o.createBuffer(),r=0;r<t.length;++r){var i=parseInt(t[r],10);if(isNaN(i))return null;e.putByte(i)}return e.getBytes()},o.bytesFromIPv6=function(t){for(var e=0,r=2*(8-(t=t.split(":").filter((function(t){return 0===t.length&&++e,!0}))).length+e),i=o.createBuffer(),n=0;n<8;++n)if(t[n]&&0!==t[n].length){var a=o.hexToBytes(t[n]);a.length<2&&i.putByte(0),i.putBytes(a)}else i.fillWithByte(0,r),r=0;return i.getBytes()},o.bytesToIP=function(t){return 4===t.length?o.bytesToIPv4(t):16===t.length?o.bytesToIPv6(t):null},o.bytesToIPv4=function(t){if(4!==t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e.join(".")},o.bytesToIPv6=function(t){if(16!==t.length)return null;for(var e=[],r=[],i=0,n=0;n<t.length;n+=2){for(var a=o.bytesToHex(t[n]+t[n+1]);"0"===a[0]&&"0"!==a;)a=a.substr(1);if("0"===a){var s=r[r.length-1],h=e.length;s&&h===s.end+1?(s.end=h,s.end-s.start>r[i].end-r[i].start&&(i=r.length-1)):r.push({start:h,end:h})}e.push(a)}if(r.length>0){var u=r[i];u.end-u.start>0&&(e.splice(u.start,u.end-u.start+1,""),0===u.start&&e.unshift(""),7===u.end&&e.push(""))}return e.join(":")},o.estimateCores=function(t,e){if("function"==typeof t&&(e=t,t={}),t=t||{},"cores"in o&&!t.update)return e(null,o.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return o.cores=navigator.hardwareConcurrency,e(null,o.cores);if("undefined"==typeof Worker)return o.cores=1,e(null,o.cores);if("undefined"==typeof Blob)return o.cores=2,e(null,o.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(t){for(var e=Date.now(),r=e+4;Date.now()<r;);self.postMessage({st:e,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function t(i,n,a){if(0===n){var s=Math.floor(i.reduce((function(t,e){return t+e}),0)/i.length);return o.cores=Math.max(1,s),URL.revokeObjectURL(r),e(null,o.cores)}!function(t,e){for(var i=[],n=[],a=0;a<t;++a){var s=new Worker(r);s.addEventListener("message",(function(r){if(n.push(r.data),n.length===t){for(var a=0;a<t;++a)i[a].terminate();e(0,n)}})),i.push(s)}for(a=0;a<t;++a)i[a].postMessage(a)}(a,(function(e,r){i.push(function(t,e){for(var r=[],i=0;i<t;++i)for(var n=e[i],a=r[i]=[],s=0;s<t;++s)if(i!==s){var o=e[s];(n.st>o.st&&n.st<o.et||o.st>n.st&&o.st<n.et)&&a.push(s)}return r.reduce((function(t,e){return Math.max(t,e.length)}),0)}(a,r)),t(i,n-1,a)}))}([],5,16)}},7626:(t,e)=>{"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,i){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)n<<=1,n|=e>>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=t>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1}r[i+0]=n>>>0,r[i+1]=a>>>0},e.rip=function(t,e,r,i){for(var n=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)n<<=1,n|=e>>>o+s&1,n<<=1,n|=t>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=e>>>o+s&1,a<<=1,a|=t>>>o+s&1;r[i+0]=n>>>0,r[i+1]=a>>>0},e.pc1=function(t,e,r,i){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1}for(o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;r[i+0]=n>>>0,r[i+1]=a>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,i,n){for(var a=0,s=0,o=r.length>>>1,h=0;h<o;h++)a<<=1,a|=t>>>r[h]&1;for(h=o;h<r.length;h++)s<<=1,s|=e>>>r[h]&1;i[n+0]=a>>>0,i[n+1]=s>>>0},e.expand=function(t,e,r){var i=0,n=0;i=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=t>>>a&63;for(a=11;a>=3;a-=4)n|=t>>>a&63,n<<=6;n|=(31&t)<<1|t>>>31,e[r+0]=i>>>0,e[r+1]=n>>>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];e.substitute=function(t,e){for(var r=0,n=0;n<4;n++)r<<=4,r|=i[64*n+(t>>>18-6*n&63)];for(n=0;n<4;n++)r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)];return r>>>0};var n=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<n.length;r++)e<<=1,e|=t>>>n[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var i=t.toString(2);i.length<e;)i="0"+i;for(var n=[],a=0;a<e;a+=r)n.push(i.slice(a,a+r));return n.join(" ")}},7714:(t,e,r)=>{"use strict";var i=r(7426),n=r(2287);function a(){if(!(this instanceof a))return new a;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(a,n),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},7758:(t,e,r)=>{"use strict";var i,n=r(6048).F,a=n.ERR_MISSING_ARGS,s=n.ERR_STREAM_DESTROYED;function o(t){if(t)throw t}function h(t){t()}function u(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var f,l=function(t){return t.length?"function"!=typeof t[t.length-1]?o:t.pop():o}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a("streams");var c=e.map((function(t,n){var a=n<e.length-1;return function(t,e,n,a){a=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(a);var o=!1;t.on("close",(function(){o=!0})),void 0===i&&(i=r(6238)),i(t,{readable:e,writable:n},(function(t){if(t)return a(t);o=!0,a()}));var h=!1;return function(e){if(!o&&!h)return h=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new s("pipe"))}}(t,a,n>0,(function(t){f||(f=t),t&&c.forEach(h),a||(c.forEach(h),l(f))}))}));return e.reduce(u)}},7766:(t,e,r)=>{"use strict";var i=r(7426),n=r(6166),a=r(3349),s=i.rotr64_hi,o=i.rotr64_lo,h=i.shr64_hi,u=i.shr64_lo,f=i.sum64,l=i.sum64_hi,c=i.sum64_lo,d=i.sum64_4_hi,p=i.sum64_4_lo,m=i.sum64_5_hi,g=i.sum64_5_lo,y=n.BlockHash,v=[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];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(t,e,r,i,n){var a=t&r^~t&n;return a<0&&(a+=4294967296),a}function M(t,e,r,i,n,a){var s=e&i^~e&a;return s<0&&(s+=4294967296),s}function _(t,e,r,i,n){var a=t&r^t&n^r&n;return a<0&&(a+=4294967296),a}function S(t,e,r,i,n,a){var s=e&i^e&a^i&a;return s<0&&(s+=4294967296),s}function E(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function C(t,e){var r=o(t,e,28)^o(e,t,2)^o(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=o(t,e,14)^o(t,e,18)^o(e,t,9);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,1)^s(t,e,8)^h(t,e,7);return r<0&&(r+=4294967296),r}function B(t,e){var r=o(t,e,1)^o(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=o(t,e,19)^o(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}i.inherits(b,y),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,i=0;i<32;i++)r[i]=t[e+i];for(;i<r.length;i+=2){var n=(g=r[i-4],y=r[i-3],v=void 0,(v=s(g,y,19)^s(y,g,29)^h(g,y,6))<0&&(v+=4294967296),v),a=I(r[i-4],r[i-3]),o=r[i-14],u=r[i-13],f=T(r[i-30],r[i-29]),l=B(r[i-30],r[i-29]),c=r[i-32],m=r[i-31];r[i]=d(n,a,o,u,f,l,c,m),r[i+1]=p(n,a,o,u,f,l,c,m)}var g,y,v},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r,i,n,o=this.W,h=this.h[0],u=this.h[1],d=this.h[2],p=this.h[3],y=this.h[4],v=this.h[5],b=this.h[6],T=this.h[7],B=this.h[8],I=this.h[9],k=this.h[10],R=this.h[11],N=this.h[12],L=this.h[13],x=this.h[14],U=this.h[15];a(this.k.length===o.length);for(var P=0;P<o.length;P+=2){var D=x,O=U,j=(n=void 0,(n=s(r=B,i=I,14)^s(r,i,18)^s(i,r,9))<0&&(n+=4294967296),n),K=A(B,I),q=w(B,0,k,0,N),V=M(0,I,0,R,0,L),F=this.k[P],z=this.k[P+1],H=o[P],G=o[P+1],Z=m(D,O,j,K,q,V,F,z,H,G),W=g(D,O,j,K,q,V,F,z,H,G);D=E(h,u),O=C(h,u),j=_(h,0,d,0,y),K=S(0,u,0,p,0,v);var Q=l(D,O,j,K),Y=c(D,O,j,K);x=N,U=L,N=k,L=R,k=B,R=I,B=l(b,T,Z,W),I=c(T,T,Z,W),b=y,T=v,y=d,v=p,d=h,p=u,h=l(Z,W,Q,Y),u=c(Z,W,Q,Y)}f(this.h,0,h,u),f(this.h,2,d,p),f(this.h,4,y,v),f(this.h,6,b,T),f(this.h,8,B,I),f(this.h,10,k,R),f(this.h,12,N,L),f(this.h,14,x,U)},b.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},7790:()=>{},7816:(t,e,r)=>{var i=r(6698),n=r(392),a=r(2861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,n.call(this,64,56)}function u(t){return t<<30|t>>>2}function f(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,h=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var c=0;c<80;++c){var d=~~(c/20),p=0|((e=i)<<5|e>>>27)+f(d,n,a,o)+h+r[c]+s[d];h=o,o=a,a=u(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},7952:(t,e,r)=>{var i=e;i.utils=r(7426),i.common=r(6166),i.sha=r(6229),i.ripemd=r(6784),i.hmac=r(8948),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},7965:()=>{},8078:(t,e,r)=>{var i=r(2861).Buffer,n=r(8276);t.exports=function(t,e,r,a){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,o=i.alloc(s),h=i.alloc(a||0),u=i.alloc(0);s>0||a>0;){var f=new n;f.update(u),f.update(t),e&&f.update(e),u=f.digest();var l=0;if(s>0){var c=o.length-s;l=Math.min(s,u.length),u.copy(o,c,0,l),s-=l}if(l<u.length&&a>0){var d=h.length-a,p=Math.min(a,u.length-l);u.copy(h,d,l,l+p),a-=p}}return u.fill(0),{key:o,iv:h}}},8106:(t,e,r)=>{var i=r(276);t.exports=i.md=i.md||{},i.md.algorithms=i.md.algorithms||{}},8170:(t,e,r)=>{"use strict";var i=r(1137),n=r(5579),a=r(4101),s=r(1241),o=r(8396),h=r(2861).Buffer;function u(t){var e;"object"!=typeof t||h.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=h.from(t));var r,u,f=a(t,e),l=f.tag,c=f.data;switch(l){case"CERTIFICATE":u=i.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=i.PublicKey.decode(c,"der")),r=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=i.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":c=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[t.algorithm.decrypt.cipher.algo.join(".")],u=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,l=parseInt(a.split("-")[1],10)/8,c=o.pbkdf2Sync(e,r,i,l,"sha1"),d=s.createDecipheriv(a,c,u),p=[];return p.push(d.update(f)),p.push(d.final()),h.concat(p)}(c=i.EncryptedPrivateKey.decode(c,"der"),e);case"PRIVATE KEY":switch(r=(u=i.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:i.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=i.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=i.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+l)}}u.signature=i.signature,t.exports=u},8206:(t,e,r)=>{var i=r(7108),n=r(2861).Buffer;function a(t){var e=n.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=n.alloc(0),o=0;s.length<e;)r=a(o++),s=n.concat([s,i("sha1").update(t).update(r).digest()]);return s.slice(0,e)}},8276:(t,e,r)=>{"use strict";var i=r(6698),n=r(4729),a=r(2861).Buffer,s=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function h(t,e){return t<<e|t>>>32-e}function u(t,e,r,i,n,a,s){return h(t+(e&r|~e&i)+n+a|0,s)+e|0}function f(t,e,r,i,n,a,s){return h(t+(e&i|r&~i)+n+a|0,s)+e|0}function l(t,e,r,i,n,a,s){return h(t+(e^r^i)+n+a|0,s)+e|0}function c(t,e,r,i,n,a,s){return h(t+(r^(e|~i))+n+a|0,s)+e|0}i(o,n),o.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,a=this._d;r=u(r,i,n,a,t[0],3614090360,7),a=u(a,r,i,n,t[1],3905402710,12),n=u(n,a,r,i,t[2],606105819,17),i=u(i,n,a,r,t[3],3250441966,22),r=u(r,i,n,a,t[4],4118548399,7),a=u(a,r,i,n,t[5],1200080426,12),n=u(n,a,r,i,t[6],2821735955,17),i=u(i,n,a,r,t[7],4249261313,22),r=u(r,i,n,a,t[8],1770035416,7),a=u(a,r,i,n,t[9],2336552879,12),n=u(n,a,r,i,t[10],4294925233,17),i=u(i,n,a,r,t[11],2304563134,22),r=u(r,i,n,a,t[12],1804603682,7),a=u(a,r,i,n,t[13],4254626195,12),n=u(n,a,r,i,t[14],2792965006,17),r=f(r,i=u(i,n,a,r,t[15],1236535329,22),n,a,t[1],4129170786,5),a=f(a,r,i,n,t[6],3225465664,9),n=f(n,a,r,i,t[11],643717713,14),i=f(i,n,a,r,t[0],3921069994,20),r=f(r,i,n,a,t[5],3593408605,5),a=f(a,r,i,n,t[10],38016083,9),n=f(n,a,r,i,t[15],3634488961,14),i=f(i,n,a,r,t[4],3889429448,20),r=f(r,i,n,a,t[9],568446438,5),a=f(a,r,i,n,t[14],3275163606,9),n=f(n,a,r,i,t[3],4107603335,14),i=f(i,n,a,r,t[8],1163531501,20),r=f(r,i,n,a,t[13],2850285829,5),a=f(a,r,i,n,t[2],4243563512,9),n=f(n,a,r,i,t[7],1735328473,14),r=l(r,i=f(i,n,a,r,t[12],2368359562,20),n,a,t[5],4294588738,4),a=l(a,r,i,n,t[8],2272392833,11),n=l(n,a,r,i,t[11],1839030562,16),i=l(i,n,a,r,t[14],4259657740,23),r=l(r,i,n,a,t[1],2763975236,4),a=l(a,r,i,n,t[4],1272893353,11),n=l(n,a,r,i,t[7],4139469664,16),i=l(i,n,a,r,t[10],3200236656,23),r=l(r,i,n,a,t[13],681279174,4),a=l(a,r,i,n,t[0],3936430074,11),n=l(n,a,r,i,t[3],3572445317,16),i=l(i,n,a,r,t[6],76029189,23),r=l(r,i,n,a,t[9],3654602809,4),a=l(a,r,i,n,t[12],3873151461,11),n=l(n,a,r,i,t[15],530742520,16),r=c(r,i=l(i,n,a,r,t[2],3299628645,23),n,a,t[0],4096336452,6),a=c(a,r,i,n,t[7],1126891415,10),n=c(n,a,r,i,t[14],2878612391,15),i=c(i,n,a,r,t[5],4237533241,21),r=c(r,i,n,a,t[12],1700485571,6),a=c(a,r,i,n,t[3],2399980690,10),n=c(n,a,r,i,t[10],4293915773,15),i=c(i,n,a,r,t[1],2240044497,21),r=c(r,i,n,a,t[8],1873313359,6),a=c(a,r,i,n,t[15],4264355552,10),n=c(n,a,r,i,t[6],2734768916,15),i=c(i,n,a,r,t[13],1309151649,21),r=c(r,i,n,a,t[4],4149444226,6),a=c(a,r,i,n,t[11],3174756917,10),n=c(n,a,r,i,t[2],718787259,15),i=c(i,n,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0},o.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 t=a.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=o},8287:(t,e,r)=>{"use strict";var i=r(7526),n=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},e.INSPECT_MAX_BYTES=50;var s=2147483647;function o(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),i=o(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return h.from(i,e,r);var n=function(t){if(h.isBuffer(t)){var e=0|p(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||V(t.length)?o(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),o(t<0?0:0|p(t))}function c(t){for(var e=t.length<0?0:0|p(t.length),r=o(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(i,h.prototype),i}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(t).length;default:if(n)return i?-1:O(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return C(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function v(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=h.from(e,i)),h.isBuffer(e))return 0===e.length?-1:b(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,i,n){var a,s=1,o=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,o/=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(a=r;a<o;a++)if(u(t,a)===u(e,-1===f?0:a-f)){if(-1===f&&(f=a),a-f+1===h)return f*s}else-1!==f&&(a-=a-f),f=-1}else for(r+h>o&&(r=o-h),a=r;a>=0;a--){for(var l=!0,c=0;c<h;c++)if(u(t,a+c)!==u(e,c)){l=!1;break}if(l)return a}return-1}function w(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=e.length;i>a/2&&(i=a/2);for(var s=0;s<i;++s){var o=parseInt(e.substr(2*s,2),16);if(V(o))return s;t[r+s]=o}return s}function M(t,e,r,i){return K(O(e,t.length-r),t,r,i)}function _(t,e,r,i){return K(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function S(t,e,r,i){return K(j(e),t,r,i)}function E(t,e,r,i){return K(function(t,e){for(var r,i,n,a=[],s=0;s<t.length&&!((e-=2)<0);++s)i=(r=t.charCodeAt(s))>>8,n=r%256,a.push(n),a.push(i);return a}(e,t.length-r),t,r,i)}function C(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var a,s,o,h,u=t[n],f=null,l=u>239?4:u>223?3:u>191?2:1;if(n+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(a=t[n+1]))&&(h=(31&u)<<6|63&a)>127&&(f=h);break;case 3:a=t[n+1],s=t[n+2],128==(192&a)&&128==(192&s)&&(h=(15&u)<<12|(63&a)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:a=t[n+1],s=t[n+2],o=t[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(h=(15&u)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&h<1114112&&(f=h)}null===f?(f=65533,l=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=l}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);for(var r="",i=0;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=T));return r}(i)}e.kMaxLength=s,h.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},h.allocUnsafe=function(t){return l(t)},h.allocUnsafeSlow=function(t){return l(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,a=Math.min(r,i);n<a;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=h.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var a=t[r];if(q(a,Uint8Array))n+a.length>i.length?h.from(a).copy(i,n):Uint8Array.prototype.set.call(i,a,n);else{if(!h.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,n)}n+=a.length}return i},h.byteLength=m,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},h.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a&&(h.prototype[a]=h.prototype.inspect),h.prototype.compare=function(t,e,r,i,n){if(q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),o=Math.min(a,s),u=this.slice(i,n),f=t.slice(e,r),l=0;l<o;++l)if(u[l]!==f[l]){a=u[l],s=f[l];break}return a<s?-1:s<a?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},h.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return M(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function B(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function I(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function k(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=e;a<r;++a)n+=F[t[a]];return n}function R(t,e,r){for(var i=t.slice(e,r),n="",a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+256*i[a+1]);return n}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,i,n,a){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<a)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function x(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,i,a){return e=+e,r>>>=0,a||x(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function P(t,e,r,i,a){return e=+e,r>>>=0,a||x(t,0,r,8),n.write(t,e,r,i,52,8),r+8}h.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var i=this.subarray(t,e);return Object.setPrototypeOf(i,h.prototype),i},h.prototype.readUintLE=h.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return i},h.prototype.readUintBE=h.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},h.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var i=e,n=1,a=this[t+--i];i>0&&(n*=256);)a+=this[t+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*e)),a},h.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||L(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,a=0;for(this[e]=255&t;++a<r&&(n*=256);)this[e+a]=t/n&255;return e+r},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||L(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,a=1;for(this[e+n]=255&t;--n>=0&&(a*=256);)this[e+n]=t/a&255;return e+r},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}var a=0,s=1,o=0;for(this[e]=255&t;++a<r&&(s*=256);)t<0&&0===o&&0!==this[e+a-1]&&(o=1),this[e+a]=(t/s|0)-o&255;return e+r},h.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);L(this,t,e,r,n-1,-n)}var a=r-1,s=1,o=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)t<0&&0===o&&0!==this[e+a+1]&&(o=1),this[e+a]=(t/s|0)-o&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,i){if(!h.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n=i-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,i):Uint8Array.prototype.set.call(t,this.subarray(r,i),e),n},h.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var s=h.isBuffer(t)?t:h.from(t,i),o=s.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<r-e;++a)this[a+e]=s[a%o]}return this};var D=/[^+/0-9A-Za-z-_]/g;function O(t,e){var r;e=e||1/0;for(var i=t.length,n=null,a=[],s=0;s<i;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function j(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}var F=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()},8310:(t,e,r)=>{t.exports=n;var i=r(7007).EventEmitter;function n(){i.call(this)}r(6698)(n,i),n.Readable=r(5412),n.Writable=r(6708),n.Duplex=r(5382),n.Transform=r(4610),n.PassThrough=r(3600),n.finished=r(6238),n.pipeline=r(7758),n.Stream=n,n.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",a),t._isStdio||e&&!1===e.end||(r.on("end",o),r.on("close",h));var s=!1;function o(){s||(s=!0,t.end())}function h(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(f(),0===i.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",n),t.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",h),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",u),t.on("error",u),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},8392:(t,e,r)=>{var i=r(276);r(9504),r(2746),r(9095),r(8106),r(1373),r(6418),r(2385),r(1417),r(5805),r(7619);var n=i.asn1,a=t.exports=i.pki=i.pki||{},s=a.oids,o={};o.CN=s.commonName,o.commonName="CN",o.C=s.countryName,o.countryName="C",o.L=s.localityName,o.localityName="L",o.ST=s.stateOrProvinceName,o.stateOrProvinceName="ST",o.O=s.organizationName,o.organizationName="O",o.OU=s.organizationalUnitName,o.organizationalUnitName="OU",o.E=s.emailAddress,o.emailAddress="E";var h=i.pki.rsa.publicKeyValidator,u={name:"Certificate",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:n.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:n.Class.UNIVERSAL,type:n.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:n.Class.UNIVERSAL,type:n.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:n.Class.UNIVERSAL,type:n.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:n.Class.UNIVERSAL,type:n.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},h,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:n.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:n.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:n.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},f={name:"rsapss",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:n.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:n.Class.UNIVERSAL,type:n.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:n.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:n.Class.UNIVERSAL,type:n.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},l={name:"CertificationRequestInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},h,{name:"CertificationRequestInfo.attributes",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0}]}]}]},c={name:"CertificationRequest",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[l,{name:"CertificationRequest.signatureAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:n.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function d(t,e){"string"==typeof e&&(e={shortName:e});for(var r,i=null,n=0;null===i&&n<t.attributes.length;++n)r=t.attributes[n],(e.type&&e.type===r.type||e.name&&e.name===r.name||e.shortName&&e.shortName===r.shortName)&&(i=r);return i}a.RDNAttributesAsArray=function(t,e){for(var r,i,a,h=[],u=0;u<t.value.length;++u){r=t.value[u];for(var f=0;f<r.value.length;++f)a={},i=r.value[f],a.type=n.derToOid(i.value[0].value),a.value=i.value[1].value,a.valueTagClass=i.value[1].type,a.type in s&&(a.name=s[a.type],a.name in o&&(a.shortName=o[a.name])),e&&(e.update(a.type),e.update(a.value)),h.push(a)}return h},a.CRIAttributesAsArray=function(t){for(var e=[],r=0;r<t.length;++r)for(var i=t[r],h=n.derToOid(i.value[0].value),u=i.value[1].value,f=0;f<u.length;++f){var l={};if(l.type=h,l.value=u[f].value,l.valueTagClass=u[f].type,l.type in s&&(l.name=s[l.type],l.name in o&&(l.shortName=o[l.name])),l.type===s.extensionRequest){l.extensions=[];for(var c=0;c<l.value.length;++c)l.extensions.push(a.certificateExtensionFromAsn1(l.value[c]))}e.push(l)}return e};var p=function(t,e,r){var i={};if(t!==s["RSASSA-PSS"])return i;r&&(i={hash:{algorithmOid:s.sha1},mgf:{algorithmOid:s.mgf1,hash:{algorithmOid:s.sha1}},saltLength:20});var a={},o=[];if(!n.validate(e,f,a,o)){var h=new Error("Cannot read RSASSA-PSS parameter block.");throw h.errors=o,h}return void 0!==a.hashOid&&(i.hash=i.hash||{},i.hash.algorithmOid=n.derToOid(a.hashOid)),void 0!==a.maskGenOid&&(i.mgf=i.mgf||{},i.mgf.algorithmOid=n.derToOid(a.maskGenOid),i.mgf.hash=i.mgf.hash||{},i.mgf.hash.algorithmOid=n.derToOid(a.maskGenHashOid)),void 0!==a.saltLength&&(i.saltLength=a.saltLength.charCodeAt(0)),i},m=function(t){switch(s[t.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return i.md.sha1.create();case"md5WithRSAEncryption":return i.md.md5.create();case"sha256WithRSAEncryption":case"RSASSA-PSS":return i.md.sha256.create();case"sha384WithRSAEncryption":return i.md.sha384.create();case"sha512WithRSAEncryption":return i.md.sha512.create();default:var e=new Error("Could not compute "+t.type+" digest. Unknown signature OID.");throw e.signatureOid=t.signatureOid,e}},g=function(t){var e,r=t.certificate;switch(r.signatureOid){case s.sha1WithRSAEncryption:case s.sha1WithRSASignature:break;case s["RSASSA-PSS"]:var n,a,o;if(void 0===(n=s[r.signatureParameters.mgf.hash.algorithmOid])||void 0===i.md[n])throw(o=new Error("Unsupported MGF hash function.")).oid=r.signatureParameters.mgf.hash.algorithmOid,o.name=n,o;if(void 0===(a=s[r.signatureParameters.mgf.algorithmOid])||void 0===i.mgf[a])throw(o=new Error("Unsupported MGF function.")).oid=r.signatureParameters.mgf.algorithmOid,o.name=a,o;if(a=i.mgf[a].create(i.md[n].create()),void 0===(n=s[r.signatureParameters.hash.algorithmOid])||void 0===i.md[n])throw(o=new Error("Unsupported RSASSA-PSS hash function.")).oid=r.signatureParameters.hash.algorithmOid,o.name=n,o;e=i.pss.create(i.md[n].create(),a,r.signatureParameters.saltLength)}return r.publicKey.verify(t.md.digest().getBytes(),t.signature,e)};function y(t){for(var e,r,a=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),s=t.attributes,o=0;o<s.length;++o){var h=(e=s[o]).value,u=n.Type.PRINTABLESTRING;"valueTagClass"in e&&(u=e.valueTagClass)===n.Type.UTF8&&(h=i.util.encodeUtf8(h)),r=n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.type).getBytes()),n.create(n.Class.UNIVERSAL,u,!1,h)])]),a.value.push(r)}return a}function v(t){for(var e,r=0;r<t.length;++r){if(void 0===(e=t[r]).name&&(e.type&&e.type in a.oids?e.name=a.oids[e.type]:e.shortName&&e.shortName in o&&(e.name=a.oids[o[e.shortName]])),void 0===e.type){if(!e.name||!(e.name in a.oids))throw(h=new Error("Attribute type not specified.")).attribute=e,h;e.type=a.oids[e.name]}if(void 0===e.shortName&&e.name&&e.name in o&&(e.shortName=o[e.name]),e.type===s.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=n.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var i=0;i<e.extensions.length;++i)e.value.push(a.certificateExtensionToAsn1(b(e.extensions[i])))}var h;if(void 0===e.value)throw(h=new Error("Attribute value not specified.")).attribute=e,h}}function b(t,e){if(e=e||{},void 0===t.name&&t.id&&t.id in a.oids&&(t.name=a.oids[t.id]),void 0===t.id){if(!t.name||!(t.name in a.oids))throw(M=new Error("Extension ID not specified.")).extension=t,M;t.id=a.oids[t.name]}if(void 0!==t.value)return t;if("keyUsage"===t.name){var r=0,o=0,h=0;t.digitalSignature&&(o|=128,r=7),t.nonRepudiation&&(o|=64,r=6),t.keyEncipherment&&(o|=32,r=5),t.dataEncipherment&&(o|=16,r=4),t.keyAgreement&&(o|=8,r=3),t.keyCertSign&&(o|=4,r=2),t.cRLSign&&(o|=2,r=1),t.encipherOnly&&(o|=1,r=0),t.decipherOnly&&(h|=128,r=7);var u=String.fromCharCode(r);0!==h?u+=String.fromCharCode(o)+String.fromCharCode(h):0!==o&&(u+=String.fromCharCode(o)),t.value=n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,u)}else if("basicConstraints"===t.name)t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),t.cA&&t.value.value.push(n.create(n.Class.UNIVERSAL,n.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in t&&t.value.value.push(n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.pathLenConstraint).getBytes()));else if("extKeyUsage"===t.name){t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);var f=t.value.value;for(var l in t)!0===t[l]&&(l in s?f.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(s[l]).getBytes())):-1!==l.indexOf(".")&&f.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(l).getBytes())))}else if("nsCertType"===t.name)r=0,o=0,t.client&&(o|=128,r=7),t.server&&(o|=64,r=6),t.email&&(o|=32,r=5),t.objsign&&(o|=16,r=4),t.reserved&&(o|=8,r=3),t.sslCA&&(o|=4,r=2),t.emailCA&&(o|=2,r=1),t.objCA&&(o|=1,r=0),u=String.fromCharCode(r),0!==o&&(u+=String.fromCharCode(o)),t.value=n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,u);else if("subjectAltName"===t.name||"issuerAltName"===t.name){t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);for(var c=0;c<t.altNames.length;++c){if(u=(v=t.altNames[c]).value,7===v.type&&v.ip){if(null===(u=i.util.bytesFromIP(v.ip)))throw(M=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=t,M}else 8===v.type&&(u=v.oid?n.oidToDer(n.oidToDer(v.oid)):n.oidToDer(u));t.value.value.push(n.create(n.Class.CONTEXT_SPECIFIC,v.type,!1,u))}}else if("nsComment"===t.name&&e.cert){if(!/^[\x00-\x7F]*$/.test(t.comment)||t.comment.length<1||t.comment.length>128)throw new Error('Invalid "nsComment" content.');t.value=n.create(n.Class.UNIVERSAL,n.Type.IA5STRING,!1,t.comment)}else if("subjectKeyIdentifier"===t.name&&e.cert){var d=e.cert.generateSubjectKeyIdentifier();t.subjectKeyIdentifier=d.toHex(),t.value=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,d.getBytes())}else if("authorityKeyIdentifier"===t.name&&e.cert){if(t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),f=t.value.value,t.keyIdentifier){var p=!0===t.keyIdentifier?e.cert.generateSubjectKeyIdentifier().getBytes():t.keyIdentifier;f.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!1,p))}if(t.authorityCertIssuer){var m=[n.create(n.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===t.authorityCertIssuer?e.cert.issuer:t.authorityCertIssuer)])];f.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,m))}if(t.serialNumber){var g=i.util.hexToBytes(!0===t.serialNumber?e.cert.serialNumber:t.serialNumber);f.push(n.create(n.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if("cRLDistributionPoints"===t.name){t.value=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),f=t.value.value;var v,b=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),w=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[]);for(c=0;c<t.altNames.length;++c){if(u=(v=t.altNames[c]).value,7===v.type&&v.ip){if(null===(u=i.util.bytesFromIP(v.ip)))throw(M=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=t,M}else 8===v.type&&(u=v.oid?n.oidToDer(n.oidToDer(v.oid)):n.oidToDer(u));w.value.push(n.create(n.Class.CONTEXT_SPECIFIC,v.type,!1,u))}b.value.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[w])),f.push(b)}var M;if(void 0===t.value)throw(M=new Error("Extension value not specified.")).extension=t,M;return t}function w(t,e){if(t===s["RSASSA-PSS"]){var r=[];return void 0!==e.hash.algorithmOid&&r.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.hash.algorithmOid).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])])),void 0!==e.mgf.algorithmOid&&r.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.mgf.algorithmOid).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.mgf.hash.algorithmOid).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])])])),void 0!==e.saltLength&&r.push(n.create(n.Class.CONTEXT_SPECIFIC,2,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(e.saltLength).getBytes())])),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,r)}return n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")}function M(t){var e=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===t.attributes.length)return e;for(var r=t.attributes,a=0;a<r.length;++a){var s=r[a],o=s.value,h=n.Type.UTF8;"valueTagClass"in s&&(h=s.valueTagClass),h===n.Type.UTF8&&(o=i.util.encodeUtf8(o));var u=!1;"valueConstructed"in s&&(u=s.valueConstructed);var f=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(s.type).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[n.create(n.Class.UNIVERSAL,h,u,o)])]);e.value.push(f)}return e}a.certificateFromPem=function(t,e,r){var s=i.pem.decode(t)[0];if("CERTIFICATE"!==s.type&&"X509 CERTIFICATE"!==s.type&&"TRUSTED CERTIFICATE"!==s.type){var o=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var h=n.fromDer(s.body,r);return a.certificateFromAsn1(h,e)},a.certificateToPem=function(t,e){var r={type:"CERTIFICATE",body:n.toDer(a.certificateToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.publicKeyFromPem=function(t){var e=i.pem.decode(t)[0];if("PUBLIC KEY"!==e.type&&"RSA PUBLIC KEY"!==e.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var s=n.fromDer(e.body);return a.publicKeyFromAsn1(s)},a.publicKeyToPem=function(t,e){var r={type:"PUBLIC KEY",body:n.toDer(a.publicKeyToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.publicKeyToRSAPublicKeyPem=function(t,e){var r={type:"RSA PUBLIC KEY",body:n.toDer(a.publicKeyToRSAPublicKey(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.getPublicKeyFingerprint=function(t,e){var r,s=(e=e||{}).md||i.md.sha1.create();switch(e.type||"RSAPublicKey"){case"RSAPublicKey":r=n.toDer(a.publicKeyToRSAPublicKey(t)).getBytes();break;case"SubjectPublicKeyInfo":r=n.toDer(a.publicKeyToAsn1(t)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+e.type+'".')}s.start(),s.update(r);var o=s.digest();if("hex"===e.encoding){var h=o.toHex();return e.delimiter?h.match(/.{2}/g).join(e.delimiter):h}if("binary"===e.encoding)return o.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".');return o},a.certificationRequestFromPem=function(t,e,r){var s=i.pem.decode(t)[0];if("CERTIFICATE REQUEST"!==s.type){var o=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw o.headerType=s.type,o}if(s.procType&&"ENCRYPTED"===s.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var h=n.fromDer(s.body,r);return a.certificationRequestFromAsn1(h,e)},a.certificationRequestToPem=function(t,e){var r={type:"CERTIFICATE REQUEST",body:n.toDer(a.certificationRequestToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.createCertificate=function(){var t={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return t.siginfo.algorithmOid=null,t.validity={},t.validity.notBefore=new Date,t.validity.notAfter=new Date,t.issuer={},t.issuer.getField=function(e){return d(t.issuer,e)},t.issuer.addField=function(e){v([e]),t.issuer.attributes.push(e)},t.issuer.attributes=[],t.issuer.hash=null,t.subject={},t.subject.getField=function(e){return d(t.subject,e)},t.subject.addField=function(e){v([e]),t.subject.attributes.push(e)},t.subject.attributes=[],t.subject.hash=null,t.extensions=[],t.publicKey=null,t.md=null,t.setSubject=function(e,r){v(e),t.subject.attributes=e,delete t.subject.uniqueId,r&&(t.subject.uniqueId=r),t.subject.hash=null},t.setIssuer=function(e,r){v(e),t.issuer.attributes=e,delete t.issuer.uniqueId,r&&(t.issuer.uniqueId=r),t.issuer.hash=null},t.setExtensions=function(e){for(var r=0;r<e.length;++r)b(e[r],{cert:t});t.extensions=e},t.getExtension=function(e){"string"==typeof e&&(e={name:e});for(var r,i=null,n=0;null===i&&n<t.extensions.length;++n)r=t.extensions[n],(e.id&&r.id===e.id||e.name&&r.name===e.name)&&(i=r);return i},t.sign=function(e,r){t.md=r||i.md.sha1.create();var o=s[t.md.algorithm+"WithRSAEncryption"];if(!o){var h=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw h.algorithm=t.md.algorithm,h}t.signatureOid=t.siginfo.algorithmOid=o,t.tbsCertificate=a.getTBSCertificate(t);var u=n.toDer(t.tbsCertificate);t.md.update(u.getBytes()),t.signature=e.sign(t.md)},t.verify=function(e){var r=!1;if(!t.issued(e)){var i=e.issuer,s=t.subject,o=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw o.expectedIssuer=s.attributes,o.actualIssuer=i.attributes,o}var h=e.md;if(null===h){h=m({signatureOid:e.signatureOid,type:"certificate"});var u=e.tbsCertificate||a.getTBSCertificate(e),f=n.toDer(u);h.update(f.getBytes())}return null!==h&&(r=g({certificate:t,md:h,signature:e.signature})),r},t.isIssuer=function(e){var r=!1,i=t.issuer,n=e.subject;if(i.hash&&n.hash)r=i.hash===n.hash;else if(i.attributes.length===n.attributes.length){var a,s;r=!0;for(var o=0;r&&o<i.attributes.length;++o)a=i.attributes[o],s=n.attributes[o],a.type===s.type&&a.value===s.value||(r=!1)}return r},t.issued=function(e){return e.isIssuer(t)},t.generateSubjectKeyIdentifier=function(){return a.getPublicKeyFingerprint(t.publicKey,{type:"RSAPublicKey"})},t.verifySubjectKeyIdentifier=function(){for(var e=s.subjectKeyIdentifier,r=0;r<t.extensions.length;++r){var n=t.extensions[r];if(n.id===e){var a=t.generateSubjectKeyIdentifier().getBytes();return i.util.hexToBytes(n.subjectKeyIdentifier)===a}}return!1},t},a.certificateFromAsn1=function(t,e){var r={},s=[];if(!n.validate(t,u,r,s)){var o=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw o.errors=s,o}if(n.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var h=a.createCertificate();h.version=r.certVersion?r.certVersion.charCodeAt(0):0;var f=i.util.createBuffer(r.certSerialNumber);h.serialNumber=f.toHex(),h.signatureOid=i.asn1.derToOid(r.certSignatureOid),h.signatureParameters=p(h.signatureOid,r.certSignatureParams,!0),h.siginfo.algorithmOid=i.asn1.derToOid(r.certinfoSignatureOid),h.siginfo.parameters=p(h.siginfo.algorithmOid,r.certinfoSignatureParams,!1),h.signature=r.certSignature;var l=[];if(void 0!==r.certValidity1UTCTime&&l.push(n.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&l.push(n.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&l.push(n.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&l.push(n.generalizedTimeToDate(r.certValidity4GeneralizedTime)),l.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(h.validity.notBefore=l[0],h.validity.notAfter=l[1],h.tbsCertificate=r.tbsCertificate,e){h.md=m({signatureOid:h.signatureOid,type:"certificate"});var c=n.toDer(h.tbsCertificate);h.md.update(c.getBytes())}var g=i.md.sha1.create(),y=n.toDer(r.certIssuer);g.update(y.getBytes()),h.issuer.getField=function(t){return d(h.issuer,t)},h.issuer.addField=function(t){v([t]),h.issuer.attributes.push(t)},h.issuer.attributes=a.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(h.issuer.uniqueId=r.certIssuerUniqueId),h.issuer.hash=g.digest().toHex();var b=i.md.sha1.create(),w=n.toDer(r.certSubject);return b.update(w.getBytes()),h.subject.getField=function(t){return d(h.subject,t)},h.subject.addField=function(t){v([t]),h.subject.attributes.push(t)},h.subject.attributes=a.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(h.subject.uniqueId=r.certSubjectUniqueId),h.subject.hash=b.digest().toHex(),r.certExtensions?h.extensions=a.certificateExtensionsFromAsn1(r.certExtensions):h.extensions=[],h.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),h},a.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r<t.value.length;++r)for(var i=t.value[r],n=0;n<i.value.length;++n)e.push(a.certificateExtensionFromAsn1(i.value[n]));return e},a.certificateExtensionFromAsn1=function(t){var e={};if(e.id=n.derToOid(t.value[0].value),e.critical=!1,t.value[1].type===n.Type.BOOLEAN?(e.critical=0!==t.value[1].value.charCodeAt(0),e.value=t.value[2].value):e.value=t.value[1].value,e.id in s)if(e.name=s[e.id],"keyUsage"===e.name){var r=0,a=0;(h=n.fromDer(e.value)).value.length>1&&(r=h.value.charCodeAt(1),a=h.value.length>2?h.value.charCodeAt(2):0),e.digitalSignature=!(128&~r),e.nonRepudiation=!(64&~r),e.keyEncipherment=!(32&~r),e.dataEncipherment=!(16&~r),e.keyAgreement=!(8&~r),e.keyCertSign=!(4&~r),e.cRLSign=!(2&~r),e.encipherOnly=!(1&~r),e.decipherOnly=!(128&~a)}else if("basicConstraints"===e.name){(h=n.fromDer(e.value)).value.length>0&&h.value[0].type===n.Type.BOOLEAN?e.cA=0!==h.value[0].value.charCodeAt(0):e.cA=!1;var o=null;h.value.length>0&&h.value[0].type===n.Type.INTEGER?o=h.value[0].value:h.value.length>1&&(o=h.value[1].value),null!==o&&(e.pathLenConstraint=n.derToInteger(o))}else if("extKeyUsage"===e.name)for(var h=n.fromDer(e.value),u=0;u<h.value.length;++u){var f=n.derToOid(h.value[u].value);f in s?e[s[f]]=!0:e[f]=!0}else if("nsCertType"===e.name)r=0,(h=n.fromDer(e.value)).value.length>1&&(r=h.value.charCodeAt(1)),e.client=!(128&~r),e.server=!(64&~r),e.email=!(32&~r),e.objsign=!(16&~r),e.reserved=!(8&~r),e.sslCA=!(4&~r),e.emailCA=!(2&~r),e.objCA=!(1&~r);else if("subjectAltName"===e.name||"issuerAltName"===e.name){var l;e.altNames=[],h=n.fromDer(e.value);for(var c=0;c<h.value.length;++c){var d={type:(l=h.value[c]).type,value:l.value};switch(e.altNames.push(d),l.type){case 1:case 2:case 6:break;case 7:d.ip=i.util.bytesToIP(l.value);break;case 8:d.oid=n.derToOid(l.value)}}}else"subjectKeyIdentifier"===e.name&&(h=n.fromDer(e.value),e.subjectKeyIdentifier=i.util.bytesToHex(h.value));return e},a.certificationRequestFromAsn1=function(t,e){var r={},s=[];if(!n.validate(t,c,r,s)){var o=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw o.errors=s,o}if(n.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var h=a.createCertificationRequest();if(h.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,h.signatureOid=i.asn1.derToOid(r.csrSignatureOid),h.signatureParameters=p(h.signatureOid,r.csrSignatureParams,!0),h.siginfo.algorithmOid=i.asn1.derToOid(r.csrSignatureOid),h.siginfo.parameters=p(h.siginfo.algorithmOid,r.csrSignatureParams,!1),h.signature=r.csrSignature,h.certificationRequestInfo=r.certificationRequestInfo,e){h.md=m({signatureOid:h.signatureOid,type:"certification request"});var u=n.toDer(h.certificationRequestInfo);h.md.update(u.getBytes())}var f=i.md.sha1.create();return h.subject.getField=function(t){return d(h.subject,t)},h.subject.addField=function(t){v([t]),h.subject.attributes.push(t)},h.subject.attributes=a.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),h.subject.hash=f.digest().toHex(),h.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),h.getAttribute=function(t){return d(h,t)},h.addAttribute=function(t){v([t]),h.attributes.push(t)},h.attributes=a.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),h},a.createCertificationRequest=function(){var t={version:0,signatureOid:null,signature:null,siginfo:{}};return t.siginfo.algorithmOid=null,t.subject={},t.subject.getField=function(e){return d(t.subject,e)},t.subject.addField=function(e){v([e]),t.subject.attributes.push(e)},t.subject.attributes=[],t.subject.hash=null,t.publicKey=null,t.attributes=[],t.getAttribute=function(e){return d(t,e)},t.addAttribute=function(e){v([e]),t.attributes.push(e)},t.md=null,t.setSubject=function(e){v(e),t.subject.attributes=e,t.subject.hash=null},t.setAttributes=function(e){v(e),t.attributes=e},t.sign=function(e,r){t.md=r||i.md.sha1.create();var o=s[t.md.algorithm+"WithRSAEncryption"];if(!o){var h=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw h.algorithm=t.md.algorithm,h}t.signatureOid=t.siginfo.algorithmOid=o,t.certificationRequestInfo=a.getCertificationRequestInfo(t);var u=n.toDer(t.certificationRequestInfo);t.md.update(u.getBytes()),t.signature=e.sign(t.md)},t.verify=function(){var e=!1,r=t.md;if(null===r){r=m({signatureOid:t.signatureOid,type:"certification request"});var i=t.certificationRequestInfo||a.getCertificationRequestInfo(t),s=n.toDer(i);r.update(s.getBytes())}return null!==r&&(e=g({certificate:t,md:r,signature:t.signature})),e},t};var _=new Date("1950-01-01T00:00:00Z"),S=new Date("2050-01-01T00:00:00Z");function E(t){return t>=_&&t<S?n.create(n.Class.UNIVERSAL,n.Type.UTCTIME,!1,n.dateToUtcTime(t)):n.create(n.Class.UNIVERSAL,n.Type.GENERALIZEDTIME,!1,n.dateToGeneralizedTime(t))}a.getTBSCertificate=function(t){var e=E(t.validity.notBefore),r=E(t.validity.notAfter),s=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes())]),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,i.util.hexToBytes(t.serialNumber)),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.siginfo.algorithmOid).getBytes()),w(t.siginfo.algorithmOid,t.siginfo.parameters)]),y(t.issuer),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[e,r]),y(t.subject),a.publicKeyToAsn1(t.publicKey)]);return t.issuer.uniqueId&&s.value.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,[n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.issuer.uniqueId)])),t.subject.uniqueId&&s.value.push(n.create(n.Class.CONTEXT_SPECIFIC,2,!0,[n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.subject.uniqueId)])),t.extensions.length>0&&s.value.push(a.certificateExtensionsToAsn1(t.extensions)),s},a.getCertificationRequestInfo=function(t){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),y(t.subject),a.publicKeyToAsn1(t.publicKey),M(t)])},a.distinguishedNameToAsn1=function(t){return y(t)},a.certificateToAsn1=function(t){var e=t.tbsCertificate||a.getTBSCertificate(t);return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[e,n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.signatureOid).getBytes()),w(t.signatureOid,t.signatureParameters)]),n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},a.certificateExtensionsToAsn1=function(t){var e=n.create(n.Class.CONTEXT_SPECIFIC,3,!0,[]),r=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);e.value.push(r);for(var i=0;i<t.length;++i)r.value.push(a.certificateExtensionToAsn1(t[i]));return e},a.certificateExtensionToAsn1=function(t){var e=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);e.value.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.id).getBytes())),t.critical&&e.value.push(n.create(n.Class.UNIVERSAL,n.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=t.value;return"string"!=typeof t.value&&(r=n.toDer(r).getBytes()),e.value.push(n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,r)),e},a.certificationRequestToAsn1=function(t){var e=t.certificationRequestInfo||a.getCertificationRequestInfo(t);return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[e,n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.signatureOid).getBytes()),w(t.signatureOid,t.signatureParameters)]),n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},a.createCaStore=function(t){var e={certs:{}};function r(t){return s(t),e.certs[t.hash]||null}function s(t){if(!t.hash){var e=i.md.sha1.create();t.attributes=a.RDNAttributesAsArray(y(t),e),t.hash=e.digest().toHex()}}if(e.getIssuer=function(t){return r(t.issuer)},e.addCertificate=function(t){if("string"==typeof t&&(t=i.pki.certificateFromPem(t)),s(t.subject),!e.hasCertificate(t))if(t.subject.hash in e.certs){var r=e.certs[t.subject.hash];i.util.isArray(r)||(r=[r]),r.push(t),e.certs[t.subject.hash]=r}else e.certs[t.subject.hash]=t},e.hasCertificate=function(t){"string"==typeof t&&(t=i.pki.certificateFromPem(t));var e=r(t.subject);if(!e)return!1;i.util.isArray(e)||(e=[e]);for(var s=n.toDer(a.certificateToAsn1(t)).getBytes(),o=0;o<e.length;++o)if(s===n.toDer(a.certificateToAsn1(e[o])).getBytes())return!0;return!1},e.listAllCertificates=function(){var t=[];for(var r in e.certs)if(e.certs.hasOwnProperty(r)){var n=e.certs[r];if(i.util.isArray(n))for(var a=0;a<n.length;++a)t.push(n[a]);else t.push(n)}return t},e.removeCertificate=function(t){var o;if("string"==typeof t&&(t=i.pki.certificateFromPem(t)),s(t.subject),!e.hasCertificate(t))return null;var h=r(t.subject);if(!i.util.isArray(h))return o=e.certs[t.subject.hash],delete e.certs[t.subject.hash],o;for(var u=n.toDer(a.certificateToAsn1(t)).getBytes(),f=0;f<h.length;++f)u===n.toDer(a.certificateToAsn1(h[f])).getBytes()&&(o=h[f],h.splice(f,1));return 0===h.length&&delete e.certs[t.subject.hash],o},t)for(var o=0;o<t.length;++o){var h=t[o];e.addCertificate(h)}return e},a.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},a.verifyCertificateChain=function(t,e,r){"function"==typeof r&&(r={verify:r}),r=r||{};var n=(e=e.slice(0)).slice(0),s=r.validityCheckDate;void 0===s&&(s=new Date);var o=!0,h=null,u=0;do{var f=e.shift(),l=null,c=!1;if(s&&(s<f.validity.notBefore||s>f.validity.notAfter)&&(h={message:"Certificate is not valid yet or has expired.",error:a.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:s}),null===h){if(null===(l=e[0]||t.getIssuer(f))&&f.isIssuer(f)&&(c=!0,l=f),l){var d=l;i.util.isArray(d)||(d=[d]);for(var p=!1;!p&&d.length>0;){l=d.shift();try{p=l.verify(f)}catch(t){}}p||(h={message:"Certificate signature is invalid.",error:a.certificateError.bad_certificate})}null!==h||l&&!c||t.hasCertificate(f)||(h={message:"Certificate is not trusted.",error:a.certificateError.unknown_ca})}if(null===h&&l&&!f.isIssuer(l)&&(h={message:"Certificate issuer is invalid.",error:a.certificateError.bad_certificate}),null===h)for(var m={keyUsage:!0,basicConstraints:!0},g=0;null===h&&g<f.extensions.length;++g){var y=f.extensions[g];y.critical&&!(y.name in m)&&(h={message:"Certificate has an unsupported critical extension.",error:a.certificateError.unsupported_certificate})}if(null===h&&(!o||0===e.length&&(!l||c))){var v=f.getExtension("basicConstraints"),b=f.getExtension("keyUsage");null!==b&&(b.keyCertSign&&null!==v||(h={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:a.certificateError.bad_certificate})),null!==h||null===v||v.cA||(h={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:a.certificateError.bad_certificate}),null===h&&null!==b&&"pathLenConstraint"in v&&u-1>v.pathLenConstraint&&(h={message:"Certificate basicConstraints pathLenConstraint violated.",error:a.certificateError.bad_certificate})}var w=null===h||h.error,M=r.verify?r.verify(w,u,n):w;if(!0!==M)throw!0===w&&(h={message:"The application rejected the certificate.",error:a.certificateError.bad_certificate}),(M||0===M)&&("object"!=typeof M||i.util.isArray(M)?"string"==typeof M&&(h.error=M):(M.message&&(h.message=M.message),M.error&&(h.error=M.error))),h;h=null,o=!1,++u}while(e.length>0);return!0}},8393:(t,e,r)=>{var i=r(8287),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(a(i,e),e.Buffer=s),a(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},8396:(t,e,r)=>{e.pbkdf2=r(3832),e.pbkdf2Sync=r(1352)},8490:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(9368).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,i){for(var n=0,a=Math.min(t.length,r),s=e;s<a;s++){var o=t.charCodeAt(s)-48;n*=i,n+=o>=49?o-49+10:o>=17?o-17+10:o}return n}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var s,o,h="le"===e,u=new t(a),f=this.clone();if(h){for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-n;o++)u[o]=0;for(o=0;!f.isZero();o++)s=f.andln(255),f.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,P=x>>>13,D=0|s[9],O=8191&D,j=D>>>13,K=0|o[0],q=8191&K,V=K>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(P,q)|0,a=Math.imul(P,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(j,q)|0,a=Math.imul(j,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(P,z)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(j,z)|0,a=Math.imul(j,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(j,Z)|0,a=Math.imul(j,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(j,Y)|0,a=Math.imul(j,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(j,rt)|0,a=Math.imul(j,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(j,at)|0,a=Math.imul(j,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(P,ht)|0,a=a+Math.imul(P,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(j,ht)|0,a=Math.imul(j,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(j,pt)|0))<<13)|0;return u=((a=Math.imul(j,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},g.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},g.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},g.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this.strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(b,v),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(M,v),n(_,v),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},8545:(t,e,r)=>{"use strict";var i=r(8490),n=r(7011),a=n.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function o(){this.place=0}function h(t,e){var r=t[e.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;if(0===t[e.place])return!1;for(var n=0,a=0,s=e.place;a<i;a++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=n.toArray(t,e);var r=new o;if(48!==t[r.place++])return!1;var a=h(t,r);if(!1===a)return!1;if(a+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=h(t,r);if(!1===s)return!1;if(128&t[r.place])return!1;var u=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var f=h(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;if(128&t[r.place])return!1;var l=t.slice(r.place,f+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new i(u),this.s=new i(l),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];f(i,e.length),(i=i.concat(e)).push(2),f(i,r.length);var a=i.concat(r),s=[48];return f(s,a.length),s=s.concat(a),n.encode(s,t)}},8650:(t,e,r)=>{"use strict";var i=r(7952),n=r(480),a=r(7011),s=a.assert,o=a.parseBytes,h=r(6661),u=r(220);function f(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=n[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=i.sha512}t.exports=f,f.prototype.sign=function(t,e){t=o(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),a=this.encodePoint(n),s=this.hashInt(a,r.pubBytes(),t).mul(r.priv()),h=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:a})},f.prototype.verify=function(t,e,r){if(t=o(t),(e=this.makeSignature(e)).S().gte(e.eddsa.curve.n)||e.S().isNeg())return!1;var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(a)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return a.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return h.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return h.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=a.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),i=!!(128&t[e]),n=a.intFromLE(r);return this.curve.pointFromY(n,i)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return a.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},8678:(t,e,r)=>{var i=r(276);r(9504),r(3986);var n=t.exports=i.tls;function a(t,e,r){var a=e.entity===i.tls.ConnectionEnd.client;t.read.cipherState={init:!1,cipher:i.cipher.createDecipher("AES-CBC",a?r.keys.server_write_key:r.keys.client_write_key),iv:a?r.keys.server_write_IV:r.keys.client_write_IV},t.write.cipherState={init:!1,cipher:i.cipher.createCipher("AES-CBC",a?r.keys.client_write_key:r.keys.server_write_key),iv:a?r.keys.client_write_IV:r.keys.server_write_IV},t.read.cipherFunction=u,t.write.cipherFunction=s,t.read.macLength=t.write.macLength=r.mac_length,t.read.macFunction=t.write.macFunction=n.hmac_sha1}function s(t,e){var r,a=!1,s=e.macFunction(e.macKey,e.sequenceNumber,t);t.fragment.putBytes(s),e.updateSequenceNumber(),r=t.version.minor===n.Versions.TLS_1_0.minor?e.cipherState.init?null:e.cipherState.iv:i.random.getBytesSync(16),e.cipherState.init=!0;var h=e.cipherState.cipher;return h.start({iv:r}),t.version.minor>=n.Versions.TLS_1_1.minor&&h.output.putBytes(r),h.update(t.fragment),h.finish(o)&&(t.fragment=h.output,t.length=t.fragment.length(),a=!0),a}function o(t,e,r){if(!r){var i=t-e.length()%t;e.fillWithByte(i-1,i)}return!0}function h(t,e,r){var i=!0;if(r){for(var n=e.length(),a=e.last(),s=n-1-a;s<n-1;++s)i=i&&e.at(s)==a;i&&e.truncate(a+1)}return i}function u(t,e){var r,a=!1;r=t.version.minor===n.Versions.TLS_1_0.minor?e.cipherState.init?null:e.cipherState.iv:t.fragment.getBytes(16),e.cipherState.init=!0;var s=e.cipherState.cipher;s.start({iv:r}),s.update(t.fragment),a=s.finish(h);var o=e.macLength,u=i.random.getBytesSync(o),f=s.output.length();f>=o?(t.fragment=s.output.getBytes(f-o),u=s.output.getBytes(o)):t.fragment=s.output.getBytes(),t.fragment=i.util.createBuffer(t.fragment),t.length=t.fragment.length();var l=e.macFunction(e.macKey,e.sequenceNumber,t);return e.updateSequenceNumber(),a=function(t,e,r){var n=i.hmac.create();return n.start("SHA1",t),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(r),e===(r=n.digest().getBytes())}(e.macKey,u,l)&&a,a}n.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=n.BulkCipherAlgorithm.aes,t.cipher_type=n.CipherType.block,t.enc_key_length=16,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=n.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:a},n.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=n.BulkCipherAlgorithm.aes,t.cipher_type=n.CipherType.block,t.enc_key_length=32,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=n.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:a}},8902:(t,e,r)=>{var i=r(8170),n=r(3209),a=r(7108),s=r(8206),o=r(2061),h=r(2509),u=r(9247),f=r(7332),l=r(2861).Buffer;t.exports=function(t,e,r){var c;c=t.padding?t.padding:r?1:4;var d,p=i(t);if(4===c)d=function(t,e){var r=t.modulus.byteLength(),i=e.length,u=a("sha1").update(l.alloc(0)).digest(),f=u.length,c=2*f;if(i>r-c-2)throw new Error("message too long");var d=l.alloc(r-i-c-2),p=r-f-1,m=n(f),g=o(l.concat([u,d,l.alloc(1,1),e],p),s(m,p)),y=o(m,s(g,f));return new h(l.concat([l.alloc(1),y,g],r))}(p,e);else if(1===c)d=function(t,e,r){var i,a=e.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");return i=r?l.alloc(s-a-3,255):function(t){for(var e,r=l.allocUnsafe(t),i=0,a=n(2*t),s=0;i<t;)s===a.length&&(a=n(2*t),s=0),(e=a[s++])&&(r[i++]=e);return r}(s-a-3),new h(l.concat([l.from([0,r?1:2]),i,l.alloc(1),e],s))}(p,e,r);else{if(3!==c)throw new Error("unknown padding");if((d=new h(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?f(d,p):u(d,p)}},8903:(t,e,r)=>{var i=r(6698),n=r(8287).Buffer,a=r(2010);function s(t){a.call(this,t),this.enc="pem"}i(s,a),t.exports=s,s.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),i=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,h=-1,u=0;u<r.length;u++){var f=r[u].match(s);if(null!==f&&f[2]===i){if(-1!==o){if("END"!==f[1])break;h=u;break}if("BEGIN"!==f[1])break;o=u}}if(-1===o||-1===h)throw new Error("PEM section not found for: "+i);var l=r.slice(o+1,h).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var c=new n(l,"base64");return a.prototype.decode.call(this,c,e)}},8948:(t,e,r)=>{"use strict";var i=r(7426),n=r(3349);function a(t,e,r){if(!(this instanceof a))return new a(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(e,r))}t.exports=a,a.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},a.prototype.update=function(t,e){return this.inner.update(t,e),this},a.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},8961:(__unused_webpack_module,exports)=>{var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(t),(function(e){r[e]=t[e]})),forEach(globals,(function(e){t[e]&&(r[e]=t[e])}));var a=Object_keys(r),s=i.call(r,this.code);return forEach(Object_keys(r),(function(e){(e in t||-1===indexOf(a,e))&&(t[e]=r[e])})),forEach(globals,(function(e){e in t||defineProp(t,e,r[e])})),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),r},forEach(Object_keys(Script.prototype),(function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(t){return t instanceof Context},exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),e}},8982:()=>{},9095:(t,e,r)=>{var i=r(276);function n(t,e){i.cipher.registerAlgorithm(t,(function(){return new i.des.Algorithm(t,e)}))}r(3900),r(6370),r(7619),t.exports=i.des=i.des||{},i.des.startEncrypting=function(t,e,r,i){var n=p({key:t,output:r,decrypt:!1,mode:i||(null===e?"ECB":"CBC")});return n.start(e),n},i.des.createEncryptionCipher=function(t,e){return p({key:t,output:null,decrypt:!1,mode:e})},i.des.startDecrypting=function(t,e,r,i){var n=p({key:t,output:r,decrypt:!0,mode:i||(null===e?"ECB":"CBC")});return n.start(e),n},i.des.createDecryptionCipher=function(t,e){return p({key:t,output:null,decrypt:!0,mode:e})},i.des.Algorithm=function(t,e){var r=this;r.name=t,r.mode=new e({blockSize:8,cipher:{encrypt:function(t,e){return d(r._keys,t,e,!1)},decrypt:function(t,e){return d(r._keys,t,e,!0)}}}),r._init=!1},i.des.Algorithm.prototype.initialize=function(t){if(!this._init){var e=i.util.createBuffer(t.key);if(0===this.name.indexOf("3DES")&&24!==e.length())throw new Error("Invalid Triple-DES key size: "+8*e.length());this._keys=function(t){for(var e,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],i=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],h=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],f=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],l=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],c=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],m=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=t.length()>8?3:1,y=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,w=0;w<g;w++){var M=t.getInt32(),_=t.getInt32();M^=(e=252645135&(M>>>4^_))<<4,M^=e=65535&((_^=e)>>>-16^M),M^=(e=858993459&(M>>>2^(_^=e<<-16)))<<2,M^=e=65535&((_^=e)>>>-16^M),M^=(e=1431655765&(M>>>1^(_^=e<<-16)))<<1,M^=e=16711935&((_^=e)>>>8^M),e=(M^=(e=1431655765&(M>>>1^(_^=e<<8)))<<1)<<8|(_^=e)>>>20&240,M=_<<24|_<<8&16711680|_>>>8&65280|_>>>24&240,_=e;for(var S=0;S<v.length;++S){v[S]?(M=M<<2|M>>>26,_=_<<2|_>>>26):(M=M<<1|M>>>27,_=_<<1|_>>>27);var E=r[(M&=-15)>>>28]|i[M>>>24&15]|n[M>>>20&15]|a[M>>>16&15]|s[M>>>12&15]|o[M>>>8&15]|h[M>>>4&15],C=u[(_&=-15)>>>28]|f[_>>>24&15]|l[_>>>20&15]|c[_>>>16&15]|d[_>>>12&15]|p[_>>>8&15]|m[_>>>4&15];e=65535&(C>>>16^E),y[b++]=E^e,y[b++]=C^e<<16}}return y}(e),this._init=!0}},n("DES-ECB",i.cipher.modes.ecb),n("DES-CBC",i.cipher.modes.cbc),n("DES-CFB",i.cipher.modes.cfb),n("DES-OFB",i.cipher.modes.ofb),n("DES-CTR",i.cipher.modes.ctr),n("3DES-ECB",i.cipher.modes.ecb),n("3DES-CBC",i.cipher.modes.cbc),n("3DES-CFB",i.cipher.modes.cfb),n("3DES-OFB",i.cipher.modes.ofb),n("3DES-CTR",i.cipher.modes.ctr);var a=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],o=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],h=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],u=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],c=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function d(t,e,r,i){var n,d,p=32===t.length?3:9;n=3===p?i?[30,-2,-2]:[0,32,2]:i?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var m=e[0],g=e[1];m^=(d=252645135&(m>>>4^g))<<4,m^=(d=65535&(m>>>16^(g^=d)))<<16,m^=d=858993459&((g^=d)>>>2^m),m^=d=16711935&((g^=d<<2)>>>8^m),m=(m^=(d=1431655765&(m>>>1^(g^=d<<8)))<<1)<<1|m>>>31,g=(g^=d)<<1|g>>>31;for(var y=0;y<p;y+=3){for(var v=n[y+1],b=n[y+2],w=n[y];w!=v;w+=b){var M=g^t[w],_=(g>>>4|g<<28)^t[w+1];d=m,m=g,g=d^(s[M>>>24&63]|h[M>>>16&63]|f[M>>>8&63]|c[63&M]|a[_>>>24&63]|o[_>>>16&63]|u[_>>>8&63]|l[63&_])}d=m,m=g,g=d}g=g>>>1|g<<31,g^=d=1431655765&((m=m>>>1|m<<31)>>>1^g),g^=(d=16711935&(g>>>8^(m^=d<<1)))<<8,g^=(d=858993459&(g>>>2^(m^=d)))<<2,g^=d=65535&((m^=d)>>>16^g),g^=d=252645135&((m^=d<<16)>>>4^g),m^=d<<4,r[0]=m,r[1]=g}function p(t){var e,r="DES-"+((t=t||{}).mode||"CBC").toUpperCase(),n=(e=t.decrypt?i.cipher.createDecipher(r,t.key):i.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof i.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,n.call(e,r)},e}},9188:(t,e,r)=>{"use strict";var i=r(7011),n=r(8490),a=r(6698),s=r(6677),o=i.assert;function h(t){s.call(this,"short",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,r,i){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(e,16),this.y=new n(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,i){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(e,16),this.y=new n(r,16),this.z=new n(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.zOne=this.z===this.curve.one}a(h,s),t.exports=h,h.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new n(t.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);e=(e=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(t.lambda)r=new n(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(e))?r=a[0]:(r=a[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new n(t.a,16),b:new n(t.b,16)}})):this._getEndoBasis(r)}}},h.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:n.mont(t),r=new n(2).toRed(e).redInvm(),i=r.redNeg(),a=new n(3).toRed(e).redNeg().redSqrt().redMul(r);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},h.prototype._getEndoBasis=function(t){for(var e,r,i,a,s,o,h,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=t,d=this.n.clone(),p=new n(1),m=new n(0),g=new n(0),y=new n(1),v=0;0!==c.cmpn(0);){var b=d.div(c);u=d.sub(b.mul(c)),f=g.sub(b.mul(p));var w=y.sub(b.mul(m));if(!i&&u.cmp(l)<0)e=h.neg(),r=p,i=u.neg(),a=f;else if(i&&2==++v)break;h=u,d=c,c=u,g=p,p=f,y=m,m=w}s=u.neg(),o=f;var M=i.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(M)>=0&&(s=e,o=r),i.negative&&(i=i.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:i,b:a},{a:s,b:o}]},h.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),a=r.b.neg().mul(t).divRound(this.n),s=n.mul(r.a),o=a.mul(i.a),h=n.mul(r.b),u=a.mul(i.b);return{k1:t.sub(s).sub(o),k2:h.add(u).neg()}},h.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(e&&!a||!e&&a)&&(i=i.redNeg()),this.point(t,i)},h.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},h.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a<t.length;a++){var s=this._endoSplit(e[a]),o=t[a],h=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),h=h.neg(!0)),i[2*a]=o,i[2*a+1]=h,n[2*a]=s.k1,n[2*a+1]=s.k2}for(var u=this._wnafMulAdd(1,i,n,2*a,r),f=0;f<2*a;f++)i[f]=null,n[f]=null;return u},a(u,s.BasePoint),h.prototype.point=function(t,e,r){return new u(this,t,e,r)},h.prototype.pointFromJSON=function(t,e){return u.fromJSON(this,t,e)},u.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return e}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;function n(e){return t.point(e[0],e[1],r)}var a=e[2];return i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(n))}},i},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new n(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},u.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(f,s.BasePoint),h.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),a=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),o=i.redSub(n),h=a.redSub(s);if(0===o.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),f=u.redMul(o),l=i.redMul(u),c=h.redSqr().redIAdd(f).redISub(l).redISub(l),d=h.redMul(l.redISub(c)).redISub(a.redMul(f)),p=this.z.redMul(t.z).redMul(o);return this.curve.jpoint(c,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,a=t.y.redMul(e).redMul(this.z),s=r.redSub(i),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),u=h.redMul(s),f=r.redMul(h),l=o.redSqr().redIAdd(u).redISub(f).redISub(f),c=o.redMul(f.redISub(l)).redISub(n.redMul(u)),d=this.z.redMul(s);return this.curve.jpoint(l,c,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var i=this.curve.a,n=this.curve.tinv,a=this.x,s=this.y,o=this.z,h=o.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=a.redSqr(),l=u.redSqr(),c=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(i.redMul(h)),p=a.redMul(l),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(c);var v=u.redMul(o);e+1<t&&(h=h.redMul(c)),a=m,o=v,u=y}return this.curve.jpoint(a,u.redMul(n),o)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i),h=o.redSqr().redISub(s).redISub(s),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=h,e=o.redMul(s.redISub(h)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),c=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(c);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=c.redIAdd(c);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(a);s=s.redIAdd(s);var o=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),h=o.redSqr().redISub(s).redISub(s);t=h;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=o.redMul(s.redISub(h)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),c=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=c.redIAdd(c),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),a=e.redSqr(),s=r.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(t.redMul(n)),h=e.redAdd(e),u=(h=h.redIAdd(h)).redMul(s),f=o.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),c=s.redSqr();c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=o.redMul(l).redISub(c),p=r.redAdd(r).redMul(i);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),i=e.redSqr(),n=t.redAdd(t).redIAdd(t),a=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(i),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),h=i.redIAdd(i);h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var u=n.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(h),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(o).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var c=this.y.redMul(u.redMul(h.redISub(u)).redISub(s.redMul(o)));c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(o);return this.curve.jpoint(l,c,d)},f.prototype.mul=function(t,e){return t=new n(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var i=e.redMul(this.z),n=r.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var i=t.clone(),n=this.curve.redN.redMul(e);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},9220:(t,e,r)=>{var i=r(6698);function n(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function a(t,e){this.path=t,this.rethrow(e)}e.a=n,n.prototype.isError=function(t){return t instanceof a},n.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},n.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},n.prototype.enterKey=function(t){return this._reporterState.path.push(t)},n.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},n.prototype.leaveKey=function(t,e,r){var i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[e]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},n.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},n.prototype.error=function(t){var e,r=this._reporterState,i=t instanceof a;if(e=i?t:new a(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return i||r.errors.push(e),e},n.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},i(a,Error),a.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},9247:(t,e,r)=>{var i=r(2509),n=r(2861).Buffer;t.exports=function(t,e){return n.from(t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed().toArray())}},9255:(t,e,r)=>{var i=r(276);r(2746),r(6418),r(2698),r(2385),r(3254),r(5071),r(1417),r(5805),r(7619),r(8392);var n=i.asn1,a=t.exports=i.pki=i.pki||{};a.pemToDer=function(t){var e=i.pem.decode(t)[0];if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return i.util.createBuffer(e.body)},a.privateKeyFromPem=function(t){var e=i.pem.decode(t)[0];if("PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var s=n.fromDer(e.body);return a.privateKeyFromAsn1(s)},a.privateKeyToPem=function(t,e){var r={type:"RSA PRIVATE KEY",body:n.toDer(a.privateKeyToAsn1(t)).getBytes()};return i.pem.encode(r,{maxline:e})},a.privateKeyInfoToPem=function(t,e){var r={type:"PRIVATE KEY",body:n.toDer(t).getBytes()};return i.pem.encode(r,{maxline:e})}},9343:(t,e,r)=>{var i=r(276);r(9504),r(2746),r(9095),r(6418),r(2385),r(9954),r(9356),r(7619),r(8392);var n=i.asn1,a=t.exports=i.pkcs7=i.pkcs7||{};function s(t){var e={},r=[];if(!n.validate(t,a.asn1.recipientInfoValidator,e,r)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=r,s}return{version:e.version.charCodeAt(0),issuer:i.pki.RDNAttributesAsArray(e.issuer),serialNumber:i.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:n.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}function o(t){for(var e,r=[],a=0;a<t.length;++a)r.push((e=t[a],n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(e.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:e.issuer}),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,i.util.hexToBytes(e.serialNumber))]),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.encryptedContent.algorithm).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e.encryptedContent.content)])));return r}function h(t){var e=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:t.issuer}),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,i.util.hexToBytes(t.serialNumber))]),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.digestAlgorithm).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])]);if(t.authenticatedAttributesAsn1&&e.value.push(t.authenticatedAttributesAsn1),e.value.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.signatureAlgorithm).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])),e.value.push(n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,t.signature)),t.unauthenticatedAttributes.length>0){for(var r=n.create(n.Class.CONTEXT_SPECIFIC,1,!0,[]),a=0;a<t.unauthenticatedAttributes.length;++a){var s=t.unauthenticatedAttributes[a];r.values.push(u(s))}e.value.push(r)}return e}function u(t){var e;if(t.type===i.pki.oids.contentType)e=n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.value).getBytes());else if(t.type===i.pki.oids.messageDigest)e=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,t.value.bytes());else if(t.type===i.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),a=new Date("2050-01-01T00:00:00Z"),s=t.value;if("string"==typeof s){var o=Date.parse(s);s=isNaN(o)?13===s.length?n.utcTimeToDate(s):n.generalizedTimeToDate(s):new Date(o)}e=s>=r&&s<a?n.create(n.Class.UNIVERSAL,n.Type.UTCTIME,!1,n.dateToUtcTime(s)):n.create(n.Class.UNIVERSAL,n.Type.GENERALIZEDTIME,!1,n.dateToGeneralizedTime(s))}return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.type).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[e])])}function f(t,e,r){var a={};if(!n.validate(e,r,a,[])){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw s.errors=s,s}if(n.derToOid(a.contentType)!==i.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(a.encryptedContent){var o="";if(i.util.isArray(a.encryptedContent))for(var h=0;h<a.encryptedContent.length;++h){if(a.encryptedContent[h].type!==n.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");o+=a.encryptedContent[h].value}else o=a.encryptedContent;t.encryptedContent={algorithm:n.derToOid(a.encAlgorithm),parameter:i.util.createBuffer(a.encParameter.value),content:i.util.createBuffer(o)}}if(a.content){if(o="",i.util.isArray(a.content))for(h=0;h<a.content.length;++h){if(a.content[h].type!==n.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");o+=a.content[h].value}else o=a.content;t.content=i.util.createBuffer(o)}return t.version=a.version.charCodeAt(0),t.rawCapture=a,a}function l(t){if(void 0===t.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===t.content){var e;switch(t.encryptedContent.algorithm){case i.pki.oids["aes128-CBC"]:case i.pki.oids["aes192-CBC"]:case i.pki.oids["aes256-CBC"]:e=i.aes.createDecryptionCipher(t.encryptedContent.key);break;case i.pki.oids.desCBC:case i.pki.oids["des-EDE3-CBC"]:e=i.des.createDecryptionCipher(t.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+t.encryptedContent.algorithm)}if(e.start(t.encryptedContent.parameter),e.update(t.encryptedContent.content),!e.finish())throw new Error("Symmetric decryption failed.");t.content=e.output}}a.messageFromPem=function(t){var e=i.pem.decode(t)[0];if("PKCS7"!==e.type){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=e.type,r}if(e.procType&&"ENCRYPTED"===e.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var s=n.fromDer(e.body);return a.messageFromAsn1(s)},a.messageToPem=function(t,e){var r={type:"PKCS7",body:n.toDer(t.toAsn1()).getBytes()};return i.pem.encode(r,{maxline:e})},a.messageFromAsn1=function(t){var e={},r=[];if(!n.validate(t,a.asn1.contentInfoValidator,e,r)){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw s.errors=r,s}var o,h=n.derToOid(e.contentType);switch(h){case i.pki.oids.envelopedData:o=a.createEnvelopedData();break;case i.pki.oids.encryptedData:o=a.createEncryptedData();break;case i.pki.oids.signedData:o=a.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+h+" is not (yet) supported.")}return o.fromAsn1(e.content.value[0]),o},a.createSignedData=function(){var t=null;return t={type:i.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(e){if(f(t,e,a.asn1.signedDataValidator),t.certificates=[],t.crls=[],t.digestAlgorithmIdentifiers=[],t.contentInfo=null,t.signerInfos=[],t.rawCapture.certificates)for(var r=t.rawCapture.certificates.value,n=0;n<r.length;++n)t.certificates.push(i.pki.certificateFromAsn1(r[n]))},toAsn1:function(){t.contentInfo||t.sign();for(var e=[],r=0;r<t.certificates.length;++r)e.push(i.pki.certificateToAsn1(t.certificates[r]));var a=[],s=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,t.digestAlgorithmIdentifiers),t.contentInfo])]);return e.length>0&&s.value[0].value.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,e)),a.length>0&&s.value[0].value.push(n.create(n.Class.CONTEXT_SPECIFIC,1,!0,a)),s.value[0].value.push(n.create(n.Class.UNIVERSAL,n.Type.SET,!0,t.signerInfos)),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.type).getBytes()),s])},addSigner:function(e){var r=e.issuer,n=e.serialNumber;if(e.certificate){var a=e.certificate;"string"==typeof a&&(a=i.pki.certificateFromPem(a)),r=a.issuer.attributes,n=a.serialNumber}var s=e.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=i.pki.privateKeyFromPem(s));var o=e.digestAlgorithm||i.pki.oids.sha1;switch(o){case i.pki.oids.sha1:case i.pki.oids.sha256:case i.pki.oids.sha384:case i.pki.oids.sha512:case i.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+o)}var h=e.authenticatedAttributes||[];if(h.length>0){for(var u=!1,f=!1,l=0;l<h.length;++l){var c=h[l];if(u||c.type!==i.pki.oids.contentType){if(f||c.type!==i.pki.oids.messageDigest);else if(f=!0,u)break}else if(u=!0,f)break}if(!u||!f)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}t.signers.push({key:s,version:1,issuer:r,serialNumber:n,digestAlgorithm:o,signatureAlgorithm:i.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:h,unauthenticatedAttributes:[]})},sign:function(e){var r;e=e||{},("object"!=typeof t.content||null===t.contentInfo)&&(t.contentInfo=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pki.oids.data).getBytes())]),"content"in t&&(t.content instanceof i.util.ByteBuffer?r=t.content.bytes():"string"==typeof t.content&&(r=i.util.encodeUtf8(t.content)),e.detached?t.detachedContent=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,r):t.contentInfo.value.push(n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,r)])))),0!==t.signers.length&&function(e){var r;if(!(r=t.detachedContent?t.detachedContent:(r=t.contentInfo.value[1]).value[0]))throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var a=n.derToOid(t.contentInfo.value[0].value),s=n.toDer(r);for(var o in s.getByte(),n.getBerValueLength(s),s=s.getBytes(),e)e[o].start().update(s);for(var f=new Date,l=0;l<t.signers.length;++l){var c=t.signers[l];if(0===c.authenticatedAttributes.length){if(a!==i.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{c.authenticatedAttributesAsn1=n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var d=n.create(n.Class.UNIVERSAL,n.Type.SET,!0,[]),p=0;p<c.authenticatedAttributes.length;++p){var m=c.authenticatedAttributes[p];m.type===i.pki.oids.messageDigest?m.value=e[c.digestAlgorithm].digest():m.type===i.pki.oids.signingTime&&(m.value||(m.value=f)),d.value.push(u(m)),c.authenticatedAttributesAsn1.value.push(u(m))}s=n.toDer(d).getBytes(),c.md.start().update(s)}c.signature=c.key.sign(c.md,"RSASSA-PKCS1-V1_5")}t.signerInfos=function(t){for(var e=[],r=0;r<t.length;++r)e.push(h(t[r]));return e}(t.signers)}(function(){for(var e={},r=0;r<t.signers.length;++r){var a=t.signers[r];(s=a.digestAlgorithm)in e||(e[s]=i.md[i.pki.oids[s]].create()),0===a.authenticatedAttributes.length?a.md=e[s]:a.md=i.md[i.pki.oids[s]].create()}for(var s in t.digestAlgorithmIdentifiers=[],e)t.digestAlgorithmIdentifiers.push(n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(s).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]));return e}())},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(e){"string"==typeof e&&(e=i.pki.certificateFromPem(e)),t.certificates.push(e)},addCertificateRevokationList:function(t){throw new Error("PKCS#7 CRL support not yet implemented.")}}},a.createEncryptedData=function(){var t=null;return t={type:i.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(e){f(t,e,a.asn1.encryptedDataValidator)},decrypt:function(e){void 0!==e&&(t.encryptedContent.key=e),l(t)}}},a.createEnvelopedData=function(){var t=null;return t={type:i.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(e){var r=f(t,e,a.asn1.envelopedDataValidator);t.recipients=function(t){for(var e=[],r=0;r<t.length;++r)e.push(s(t[r]));return e}(r.recipientInfos.value)},toAsn1:function(){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(t.type).getBytes()),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(t.version).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SET,!0,o(t.recipients)),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,(e=t.encryptedContent,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pki.oids.data).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(e.algorithm).getBytes()),e.parameter?n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),n.create(n.Class.CONTEXT_SPECIFIC,0,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e.content.getBytes())])]))])])]);var e},findRecipient:function(e){for(var r=e.issuer.attributes,i=0;i<t.recipients.length;++i){var n=t.recipients[i],a=n.issuer;if(n.serialNumber===e.serialNumber&&a.length===r.length){for(var s=!0,o=0;o<r.length;++o)if(a[o].type!==r[o].type||a[o].value!==r[o].value){s=!1;break}if(s)return n}}return null},decrypt:function(e,r){if(void 0===t.encryptedContent.key&&void 0!==e&&void 0!==r)switch(e.encryptedContent.algorithm){case i.pki.oids.rsaEncryption:case i.pki.oids.desCBC:var n=r.decrypt(e.encryptedContent.content);t.encryptedContent.key=i.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}l(t)},addRecipient:function(e){t.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:i.pki.oids.rsaEncryption,key:e.publicKey}})},encrypt:function(e,r){if(void 0===t.encryptedContent.content){var n,a,s;switch(r=r||t.encryptedContent.algorithm,e=e||t.encryptedContent.key,r){case i.pki.oids["aes128-CBC"]:n=16,a=16,s=i.aes.createEncryptionCipher;break;case i.pki.oids["aes192-CBC"]:n=24,a=16,s=i.aes.createEncryptionCipher;break;case i.pki.oids["aes256-CBC"]:n=32,a=16,s=i.aes.createEncryptionCipher;break;case i.pki.oids["des-EDE3-CBC"]:n=24,a=8,s=i.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(void 0===e)e=i.util.createBuffer(i.random.getBytes(n));else if(e.length()!=n)throw new Error("Symmetric key has wrong length; got "+e.length()+" bytes, expected "+n+".");t.encryptedContent.algorithm=r,t.encryptedContent.key=e,t.encryptedContent.parameter=i.util.createBuffer(i.random.getBytes(a));var o=s(e);if(o.start(t.encryptedContent.parameter.copy()),o.update(t.content),!o.finish())throw new Error("Symmetric encryption failed.");t.encryptedContent.content=o.output}for(var h=0;h<t.recipients.length;++h){var u=t.recipients[h];if(void 0===u.encryptedContent.content){if(u.encryptedContent.algorithm!==i.pki.oids.rsaEncryption)throw new Error("Unsupported asymmetric cipher, OID "+u.encryptedContent.algorithm);u.encryptedContent.content=u.encryptedContent.key.encrypt(t.encryptedContent.key.data)}}}}}},9356:(t,e,r)=>{var i=r(276);r(9504),r(172),r(3878),r(7619),i.random&&i.random.getBytes?t.exports=i.random:function(e){var r={},n=new Array(4),a=i.util.createBuffer();function s(){var t=i.prng.create(r);return t.getBytes=function(e,r){return t.generate(e,r)},t.getBytesSync=function(e){return t.generate(e)},t}r.formatKey=function(t){var e=i.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),i.aes._expandKey(t,!1)},r.formatSeed=function(t){var e=i.util.createBuffer(t);return(t=new Array(4))[0]=e.getInt32(),t[1]=e.getInt32(),t[2]=e.getInt32(),t[3]=e.getInt32(),t},r.cipher=function(t,e){return i.aes._updateBlock(t,e,n,!1),a.putInt32(n[0]),a.putInt32(n[1]),a.putInt32(n[2]),a.putInt32(n[3]),a.getBytes()},r.increment=function(t){return++t[3],t},r.md=i.md.sha256;var o=s(),h=null,u=i.util.globalScope,f=u.crypto||u.msCrypto;if(f&&f.getRandomValues&&(h=function(t){return f.getRandomValues(t)}),i.options.usePureJavaScript||!i.util.isNodejs&&!h){if("undefined"==typeof window||window.document,o.collectInt(+new Date,32),"undefined"!=typeof navigator){var l="";for(var c in navigator)try{"string"==typeof navigator[c]&&(l+=navigator[c])}catch(t){}o.collect(l),l=null}e&&(e().mousemove((function(t){o.collectInt(t.clientX,16),o.collectInt(t.clientY,16)})),e().keypress((function(t){o.collectInt(t.charCode,8)})))}if(i.random)for(var c in o)i.random[c]=o[c];else i.random=o;i.random.createInstance=s,t.exports=i.random}("undefined"!=typeof jQuery?jQuery:null)},9368:()=>{},9404:function(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function h(t,e,r){var i=o(t,r);return r-1>=e&&(i|=o(t,r-1)<<4),i}function u(t,e,r,n){for(var a=0,s=0,o=Math.min(t.length,r),h=e;h<o;h++){var u=t.charCodeAt(h)-48;a*=n,s=u>=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&s<n,"Invalid character"),a+=s}return a}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,s,o=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,a=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=h(t,e,i)<<a,this.words[s]|=67108863&n,a>=18?(a-=18,s+=1,this.words[s]|=n>>>26):a+=8;this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,s=a%i,o=Math.min(a,a-s)+r,h=0,f=r;f<o;f+=i)h=u(t,f,f+i,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype._move=function(t){f(t,this)},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(t){a.prototype.inspect=l}else a.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],s=n*a,o=67108863&s,h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(a=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r._strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,a=0,s=0;s<this.length;s++){var o=this.words[s],h=(16777215&(o<<n|a)).toString(16);a=o>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==a||s!==this.length-1?c[6-h.length]+h+r:h+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?m+r:c[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,a);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},a.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,a=0;n<this.length;n++){var s=this.words[n]<<a|i;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===a?(r<t.length&&(t[r++]=s>>24&255),i=0,a=0):(i=s>>>24,a+=2)}if(r<t.length)for(t[r++]=i;r<t.length;)t[r++]=0},a.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,i=0,n=0,a=0;n<this.length;n++){var s=this.words[n]<<a|i;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===a?(r>=0&&(t[r--]=s>>24&255),i=0,a=0):(i=s>>>24,a+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this._strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},a.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var a=0,s=0;s<i.length;s++)a=(e=(0|r.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<r.length;s++)a=(e=(0|r.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var i,n,a,s=t.words,o=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,M=b>>>13,_=0|s[4],S=8191&_,E=_>>>13,C=0|s[5],A=8191&C,T=C>>>13,B=0|s[6],I=8191&B,k=B>>>13,R=0|s[7],N=8191&R,L=R>>>13,x=0|s[8],U=8191&x,P=x>>>13,D=0|s[9],O=8191&D,j=D>>>13,K=0|o[0],q=8191&K,V=K>>>13,F=0|o[1],z=8191&F,H=F>>>13,G=0|o[2],Z=8191&G,W=G>>>13,Q=0|o[3],Y=8191&Q,X=Q>>>13,J=0|o[4],$=8191&J,tt=J>>>13,et=0|o[5],rt=8191&et,it=et>>>13,nt=0|o[6],at=8191&nt,st=nt>>>13,ot=0|o[7],ht=8191&ot,ut=ot>>>13,ft=0|o[8],lt=8191&ft,ct=ft>>>13,dt=0|o[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,q))|0)+((8191&(n=(n=Math.imul(l,V))+Math.imul(c,q)|0))<<13)|0;u=((a=Math.imul(c,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,V))+Math.imul(m,q)|0,a=Math.imul(m,V);var yt=(u+(i=i+Math.imul(l,z)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(c,z)|0))<<13)|0;u=((a=a+Math.imul(c,H)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,q),n=(n=Math.imul(y,V))+Math.imul(v,q)|0,a=Math.imul(v,V),i=i+Math.imul(p,z)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,H)|0;var vt=(u+(i=i+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,W)|0)+Math.imul(c,Z)|0))<<13)|0;u=((a=a+Math.imul(c,W)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,V))+Math.imul(M,q)|0,a=Math.imul(M,V),i=i+Math.imul(y,z)|0,n=(n=n+Math.imul(y,H)|0)+Math.imul(v,z)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,W)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0;var bt=(u+(i=i+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((a=a+Math.imul(c,X)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,V))+Math.imul(E,q)|0,a=Math.imul(E,V),i=i+Math.imul(w,z)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,H)|0,i=i+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((a=a+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,q),n=(n=Math.imul(A,V))+Math.imul(T,q)|0,a=Math.imul(T,V),i=i+Math.imul(S,z)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(E,z)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,W)|0)+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var Mt=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((a=a+Math.imul(c,it)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(I,q),n=(n=Math.imul(I,V))+Math.imul(k,q)|0,a=Math.imul(k,V),i=i+Math.imul(A,z)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(T,z)|0,a=a+Math.imul(T,H)|0,i=i+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,W)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,W)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,X)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,it)|0;var _t=(u+(i=i+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,at)|0))<<13)|0;u=((a=a+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,V))+Math.imul(L,q)|0,a=Math.imul(L,V),i=i+Math.imul(I,z)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,z)|0,a=a+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,W)|0)+Math.imul(T,Z)|0,a=a+Math.imul(T,W)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,X)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(p,at)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((a=a+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(U,q),n=(n=Math.imul(U,V))+Math.imul(P,q)|0,a=Math.imul(P,V),i=i+Math.imul(N,z)|0,n=(n=n+Math.imul(N,H)|0)+Math.imul(L,z)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(I,Z)|0,n=(n=n+Math.imul(I,W)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(y,at)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,a=a+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((a=a+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(O,q),n=(n=Math.imul(O,V))+Math.imul(j,q)|0,a=Math.imul(j,V),i=i+Math.imul(U,z)|0,n=(n=n+Math.imul(U,H)|0)+Math.imul(P,z)|0,a=a+Math.imul(P,H)|0,i=i+Math.imul(N,Z)|0,n=(n=n+Math.imul(N,W)|0)+Math.imul(L,Z)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(w,at)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(v,ht)|0,a=a+Math.imul(v,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var Ct=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((a=a+Math.imul(c,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(O,z),n=(n=Math.imul(O,H))+Math.imul(j,z)|0,a=Math.imul(j,H),i=i+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(P,Z)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(N,Y)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,it)|0,i=i+Math.imul(S,at)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,ht)|0,a=a+Math.imul(M,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(O,Z),n=(n=Math.imul(O,W))+Math.imul(j,Z)|0,a=Math.imul(j,W),i=i+Math.imul(U,Y)|0,n=(n=n+Math.imul(U,X)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,X)|0,i=i+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(A,at)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,a=a+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,ct)|0;var Tt=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(O,Y),n=(n=Math.imul(O,X))+Math.imul(j,Y)|0,a=Math.imul(j,X),i=i+Math.imul(U,$)|0,n=(n=n+Math.imul(U,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,i=i+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,it)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(I,at)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(T,ht)|0,a=a+Math.imul(T,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0;var Bt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(O,$),n=(n=Math.imul(O,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),i=i+Math.imul(U,rt)|0,n=(n=n+Math.imul(U,it)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,it)|0,i=i+Math.imul(N,at)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(k,ht)|0,a=a+Math.imul(k,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((a=a+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(O,rt),n=(n=Math.imul(O,it))+Math.imul(j,rt)|0,a=Math.imul(j,it),i=i+Math.imul(U,at)|0,n=(n=n+Math.imul(U,st)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,st)|0,i=i+Math.imul(N,ht)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(L,ht)|0,a=a+Math.imul(L,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0;var kt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(O,at),n=(n=Math.imul(O,st))+Math.imul(j,at)|0,a=Math.imul(j,st),i=i+Math.imul(U,ht)|0,n=(n=n+Math.imul(U,ut)|0)+Math.imul(P,ht)|0,a=a+Math.imul(P,ut)|0,i=i+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0;var Rt=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((a=a+Math.imul(k,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(O,ht),n=(n=Math.imul(O,ut))+Math.imul(j,ht)|0,a=Math.imul(j,ut),i=i+Math.imul(U,lt)|0,n=(n=n+Math.imul(U,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0;var Nt=(u+(i=i+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,i=Math.imul(O,lt),n=(n=Math.imul(O,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct);var Lt=(u+(i=i+Math.imul(U,pt)|0)|0)+((8191&(n=(n=n+Math.imul(U,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var xt=(u+(i=Math.imul(O,pt))|0)+((8191&(n=(n=Math.imul(O,mt))+Math.imul(j,pt)|0))<<13)|0;return u=((a=Math.imul(j,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h[0]=gt,h[1]=yt,h[2]=vt,h[3]=bt,h[4]=wt,h[5]=Mt,h[6]=_t,h[7]=St,h[8]=Et,h[9]=Ct,h[10]=At,h[11]=Tt,h[12]=Bt,h[13]=It,h[14]=kt,h[15]=Rt,h[16]=Nt,h[17]=Lt,h[18]=xt,0!==u&&(h[19]=u,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var s=n;n=0;for(var o=67108863&i,h=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=h;u++){var f=a-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;o=67108863&(c=c+o|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[a]=o,i=s,s=n}return 0!==i?r.words[a]=i:r.length--,r._strip()}function v(t,e,r){return y(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?y(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},b.prototype.permute=function(t,e,r,i,n,a){for(var s=0;s<a;s++)i[s]=e[t[s]],n[s]=r[t[s]]},b.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var o=s<<1,h=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),f=0;f<n;f+=o)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],v=l*g-c*y;y=l*y+c*g,g=v,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==o&&(v=h*l-u*c,c=h*c+u*l,l=v)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},b.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},b.prototype.convert13b=function(t,e,r,n){for(var a=0,s=0;s<e;s++)a+=0|t[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===a),i(!(-8192&a))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),s=new Array(i),o=new Array(i),h=new Array(i),u=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,u,i),this.transform(s,a,o,h,i,n),this.transform(u,a,f,l,i,n);for(var d=0;d<i;d++){var p=o[d]*f[d]-h[d]*l[d];h[d]=o[d]*l[d]+h[d]*f[d],o[d]=p}return this.conjugate(o,h,i),this.transform(o,h,c,a,i,n),this.conjugate(c,a,i),this.normalize13b(c,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),v(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var a=(0|this.words[n])*t,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=t.words[i]>>>n&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,h=(0|this.words[e])-o<<r;this.words[e]=h|s,s=o>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,h=r;if(n-=s,n=Math.max(0,n),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-a|l>>>a,f=l&o}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a,s=t.length+r;this._expand(s);var o=0;for(n=0;n<t.length;n++){a=(0|this.words[n+r])+o;var h=(0|t.words[n])*e;o=((a-=67108863&h)>>26)-(h/67108864|0),this.words[n+r]=67108863&a}for(;n<this.length-r;n++)o=(a=(0|this.words[n+r])+o)>>26,this.words[n+r]=67108863&a;if(0===o)return this._strip();for(i(-1===o),o=0,n=0;n<this.length;n++)o=(a=-(0|this.words[n])+o)>>26,this.words[n]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var o,h=i.length-n.length;if("mod"!==e){(o=new a(null)).length=h+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var f=i.clone()._ishlnsubmul(n,1,h);0===f.negative&&(i=f,o&&(o.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|i.words[n.length+l])+(0|i.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(n,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(n,1,l),i.isZero()||(i.negative^=1);o&&(o.words[l]=c)}return o&&o._strip(),i._strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:o||null,mod:i}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):this.negative&t.negative?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,a=this.length-1;a>=0;a--)n=(r*n+(0|this.words[a]))%t;return e?-n:n},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*r;this.words[n]=a/t|0,r=a%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),s=new a(0),o=new a(0),h=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;!(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||h.isOdd())&&(o.iadd(f),h.isub(l)),o.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o),s.isub(h)):(r.isub(e),o.isub(n),h.isub(s))}return{a:o,b:h,gcd:r.iushln(u)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new a(1),o=new a(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;!(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;!(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(h),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(n=0===e.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new A(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function M(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){M.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){M.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){M.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){M.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function T(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}M.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},M.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},M.prototype.split=function(t,e){t.iushrn(this.n,0,e)},M.prototype.imulK=function(t){return t.imul(this.k)},n(_,M),_.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n<i;n++)e.words[n]=t.words[n];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&r)<<4|a>>>22,a=s}a>>>=22,t.words[n-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(S,M),n(E,M),n(C,M),C.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return w[t]=e,e},A.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var o=new a(1).toRed(this),h=o.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(o);){for(var m=d,g=0;0!==m.cmp(o);g++)m=m.redSqr();i(g<p);var y=this.pow(l,new a(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],s=0,o=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++o||0===i&&0===f)&&(n=this.mul(n,r[s]),o=0,s=0)):o=0}h=26}return n},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new T(t)},n(T,A),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},9504:(t,e,r)=>{var i=r(276);function n(t,e){i.cipher.registerAlgorithm(t,(function(){return new i.aes.Algorithm(t,e)}))}r(3900),r(6370),r(7619),t.exports=i.aes=i.aes||{},i.aes.startEncrypting=function(t,e,r,i){var n=m({key:t,output:r,decrypt:!1,mode:i});return n.start(e),n},i.aes.createEncryptionCipher=function(t,e){return m({key:t,output:null,decrypt:!1,mode:e})},i.aes.startDecrypting=function(t,e,r,i){var n=m({key:t,output:r,decrypt:!0,mode:i});return n.start(e),n},i.aes.createDecryptionCipher=function(t,e){return m({key:t,output:null,decrypt:!0,mode:e})},i.aes.Algorithm=function(t,e){f||c();var r=this;r.name=t,r.mode=new e({blockSize:16,cipher:{encrypt:function(t,e){return p(r._w,t,e,!1)},decrypt:function(t,e){return p(r._w,t,e,!0)}}}),r._init=!1},i.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e,r=t.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(i.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){e=r,r=i.util.createBuffer();for(var n=0;n<e.length;++n)r.putByte(e[n])}}else r=i.util.createBuffer(r);if(!i.util.isArray(r)){e=r,r=[];var a=e.length();if(16===a||24===a||32===a)for(a>>>=2,n=0;n<a;++n)r.push(e.getInt32())}if(!i.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var s=this.mode.name,o=-1!==["CFB","OFB","CTR","GCM"].indexOf(s);this._w=d(r,t.decrypt&&!o),this._init=!0}},i.aes._expandKey=function(t,e){return f||c(),d(t,e)},i.aes._updateBlock=p,n("AES-ECB",i.cipher.modes.ecb),n("AES-CBC",i.cipher.modes.cbc),n("AES-CFB",i.cipher.modes.cfb),n("AES-OFB",i.cipher.modes.ofb),n("AES-CTR",i.cipher.modes.ctr),n("AES-GCM",i.cipher.modes.gcm);var a,s,o,h,u,f=!1,l=4;function c(){f=!0,o=[0,1,2,4,8,16,32,64,128,27,54];for(var t=new Array(256),e=0;e<128;++e)t[e]=e<<1,t[e+128]=e+128<<1^283;for(a=new Array(256),s=new Array(256),h=new Array(4),u=new Array(4),e=0;e<4;++e)h[e]=new Array(256),u[e]=new Array(256);var r,i,n,l,c,d,p,m=0,g=0;for(e=0;e<256;++e){l=(l=g^g<<1^g<<2^g<<3^g<<4)>>8^255&l^99,a[m]=l,s[l]=m,d=(c=t[l])<<24^l<<16^l<<8^l^c,p=((r=t[m])^(i=t[r])^(n=t[i]))<<24^(m^n)<<16^(m^i^n)<<8^m^r^n;for(var y=0;y<4;++y)h[y][m]=d,u[y][l]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;0===m?m=g=1:(m=r^t[t[t[r^n]]],g^=t[t[g]])}}function d(t,e){for(var r,i=t.slice(0),n=1,s=i.length,h=l*(s+6+1),f=s;f<h;++f)r=i[f-1],f%s==0?(r=a[r>>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^o[n]<<24,n++):s>6&&f%s==4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),i[f]=i[f-s]^r;if(e){for(var c,d=u[0],p=u[1],m=u[2],g=u[3],y=i.slice(0),v=(f=0,(h=i.length)-l);f<h;f+=l,v-=l)if(0===f||f===h-l)y[f]=i[v],y[f+1]=i[v+3],y[f+2]=i[v+2],y[f+3]=i[v+1];else for(var b=0;b<l;++b)c=i[v+b],y[f+(3&-b)]=d[a[c>>>24]]^p[a[c>>>16&255]]^m[a[c>>>8&255]]^g[a[255&c]];i=y}return i}function p(t,e,r,i){var n,o,f,l,c,d,p,m,g,y,v,b,w=t.length/4-1;i?(n=u[0],o=u[1],f=u[2],l=u[3],c=s):(n=h[0],o=h[1],f=h[2],l=h[3],c=a),d=e[0]^t[0],p=e[i?3:1]^t[1],m=e[2]^t[2],g=e[i?1:3]^t[3];for(var M=3,_=1;_<w;++_)y=n[d>>>24]^o[p>>>16&255]^f[m>>>8&255]^l[255&g]^t[++M],v=n[p>>>24]^o[m>>>16&255]^f[g>>>8&255]^l[255&d]^t[++M],b=n[m>>>24]^o[g>>>16&255]^f[d>>>8&255]^l[255&p]^t[++M],g=n[g>>>24]^o[d>>>16&255]^f[p>>>8&255]^l[255&m]^t[++M],d=y,p=v,m=b;r[0]=c[d>>>24]<<24^c[p>>>16&255]<<16^c[m>>>8&255]<<8^c[255&g]^t[++M],r[i?3:1]=c[p>>>24]<<24^c[m>>>16&255]<<16^c[g>>>8&255]<<8^c[255&d]^t[++M],r[2]=c[m>>>24]<<24^c[g>>>16&255]<<16^c[d>>>8&255]<<8^c[255&p]^t[++M],r[i?1:3]=c[g>>>24]<<24^c[d>>>16&255]<<16^c[p>>>8&255]<<8^c[255&m]^t[++M]}function m(t){var e,r="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),n=(e=t.decrypt?i.cipher.createDecipher(r,t.key):i.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof i.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,n.call(e,r)},e}},9547:(t,e,r)=>{t.exports=r(276),r(9504),r(8678),r(2746),r(3900),r(9095),r(2926),r(1696),r(3432),r(2045),r(1355),r(5250),r(3254),r(2385),r(7501),r(5071),r(9343),r(9255),r(268),r(3878),r(1417),r(9356),r(5124),r(149),r(3986),r(7619)},9560:(t,e,r)=>{"use strict";e.utils=r(7626),e.Cipher=r(2808),e.DES=r(2211),e.CBC=r(3389),e.EDE=r(5279)},9673:(t,e,r)=>{var i=e;i.Reporter=r(9220).a,i.DecoderBuffer=r(7227).t,i.EncoderBuffer=r(7227).d,i.Node=r(993)},9838:()=>{},9954:(t,e,r)=>{var i=r(276);r(2746),r(7619);var n=i.asn1,a=t.exports=i.pkcs7asn1=i.pkcs7asn1||{};i.pkcs7=i.pkcs7||{},i.pkcs7.asn1=a;var s={name:"ContentInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};a.contentInfoValidator=s;var o={name:"EncryptedContentInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:n.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};a.envelopedDataValidator={name:"EnvelopedData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(o)},a.encryptedDataValidator={name:"EncryptedData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"}].concat(o)};var h={name:"SignerInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:n.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};a.signedDataValidator={name:"SignedData",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:n.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:n.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:n.Class.UNIVERSAL,type:n.Type.SET,capture:"signerInfos",optional:!0,value:[h]}]},a.recipientInfoValidator={name:"RecipientInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:n.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}getProto=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);__webpack_require__.r(r);var i={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var n=2&e&&t;"object"==typeof n&&!~leafPrototypes.indexOf(n);n=getProto(n))Object.getOwnPropertyNames(n).forEach((e=>i[e]=()=>t[e]));return i.default=()=>t,__webpack_require__.d(r,i),r},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var __webpack_exports__={};(()=>{"use strict";async function t(t,e,r){const i=[];t.replace(e,((t,...e)=>(i.push(r(t,...e)),t)));const n=await Promise.all(i);return t.replace(e,(()=>n.shift()))}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{TinyCertCrypto:()=>C,TinyCrypto:()=>S,TinyLevelUp:()=>e,asyncReplace:()=>t,cloneObjTypeOrder:()=>l,countObj:()=>p,extendObjType:()=>u,formatCustomTimer:()=>n,formatDayTimer:()=>s,formatTimer:()=>a,getAge:()=>y,getSimplePerc:()=>g,getTimeDuration:()=>i,objType:()=>d,reorderObjTypeOrder:()=>f,ruleOfThree:()=>m,shuffleArray:()=>r,toTitleCase:()=>v,toTitleCaseLowerFirst:()=>b});const e=class{constructor(t,e){this.giveExp=t,this.expLevel=e}expValidator(t){let e=0;const r=this.expLevel*t.level;return t.exp>=r&&(t.level++,e=t.exp-r,t.exp=0,e>0)?this.give(t,e,"extra"):t.exp<1&&t.level>1&&(t.level--,e=Math.abs(t.exp),t.exp=this.expLevel*t.level,e>0)?this.remove(t,e,"extra"):t}getTotalExp(t){let e=0;for(let r=1;r<=t.level;r++)e+=this.expLevel*r;return e+=t.exp,e}expGenerator(t=1){return Math.floor(Math.random()*this.giveExp)+1*t}progress(t){return this.expLevel*t.level}getProgress(t){return this.expLevel*t.level}set(t,e){return t.exp=e,this.expValidator(t),t.totalExp=this.getTotalExp(t),t}give(t,e=0,r="add",i=1){return"add"===r?t.exp+=this.expGenerator(i)+e:"extra"===r&&(t.exp+=e),this.expValidator(t),t.totalExp=this.getTotalExp(t),t}remove(t,e=0,r="add",i=1){return"add"===r?t.exp-=this.expGenerator(i)+e:"extra"===r&&(t.exp-=e),this.expValidator(t),t.totalExp=this.getTotalExp(t),t}};function r(t){let e,r=t.length;for(;0!==r;)e=Math.floor(Math.random()*r),r--,[t[r],t[e]]=[t[e],t[r]];return t}function i(t=new Date,e="asSeconds",r=null){if(t instanceof Date){const i=r instanceof Date?r:new Date,n=t.getTime()-i.getTime();switch(e){case"asMilliseconds":return n;case"asSeconds":default:return n/1e3;case"asMinutes":return n/6e4;case"asHours":return n/36e5;case"asDays":return n/864e5}}return null}function n(t,e="seconds",r="{time}"){t=Math.max(0,Math.floor(t));const i=["seconds","minutes","hours","days","months","years"].indexOf(e),n=i>=5,a=i>=4,s=i>=3,o=i>=2,h=i>=1,u=i>=0,f={years:n?0:NaN,months:a?0:NaN,days:s?0:NaN,hours:o?0:NaN,minutes:h?0:NaN,seconds:u?0:NaN,total:NaN};let l=t;if(n||a||s){const t=new Date(1980,0,1),e=new Date(t.getTime()+1e3*l),r=new Date(t);if(n)for(;new Date(r.getFullYear()+1,r.getMonth(),r.getDate()).getTime()<=e.getTime();)r.setFullYear(r.getFullYear()+1),f.years++;if(a)for(;new Date(r.getFullYear(),r.getMonth()+1,r.getDate()).getTime()<=e.getTime();)r.setMonth(r.getMonth()+1),f.months++;if(s)for(;new Date(r.getFullYear(),r.getMonth(),r.getDate()+1).getTime()<=e.getTime();)r.setDate(r.getDate()+1),f.days++;l=Math.floor((e.getTime()-r.getTime())/1e3)}o&&(f.hours=Math.floor(l/3600),l%=3600),h&&(f.minutes=Math.floor(l/60),l%=60),u&&(f.seconds=l);const c={seconds:u?t:NaN,minutes:h?t/60:NaN,hours:o?t/3600:NaN,days:s?t/86400:NaN,months:a?12*f.years+f.months+(f.days||0)/30:NaN,years:n?f.years+(f.months||0)/12+(f.days||0)/365:NaN};f.total=+(c[e]||0).toFixed(2).replace(/\.00$/,"");const d=t=>{const e="string"==typeof t?parseInt(t):t;return Number.isNaN(e)?"NaN":String(e).padStart(2,"0")},p=[o?d(f.hours):null,h?d(f.minutes):null,u?d(f.seconds):null].filter((t=>null!==t)).join(":");return r.replace(/\{years\}/g,String(f.years)).replace(/\{months\}/g,String(f.months)).replace(/\{days\}/g,String(f.days)).replace(/\{hours\}/g,d(f.hours)).replace(/\{minutes\}/g,d(f.minutes)).replace(/\{seconds\}/g,d(f.seconds)).replace(/\{time\}/g,p).replace(/\{total\}/g,String(f.total)).trim()}function a(t){return n(t,"hours","{hours}:{minutes}:{seconds}")}function s(t){return n(t,"days","{days}d {hours}:{minutes}:{seconds}")}var o=__webpack_require__(8287);const h={items:{undefined:t=>void 0===t,null:t=>null===t,boolean:t=>"boolean"==typeof t,number:t=>"number"==typeof t&&!isNaN(t),bigint:t=>"bigint"==typeof t,string:t=>"string"==typeof t,symbol:t=>"symbol"==typeof t,function:t=>"function"==typeof t,array:t=>Array.isArray(t),date:t=>t instanceof Date,regexp:t=>t instanceof RegExp,map:t=>t instanceof Map,set:t=>t instanceof Set,weakmap:t=>t instanceof WeakMap,weakset:t=>t instanceof WeakSet,promise:t=>t instanceof Promise,buffer:t=>void 0!==o.Buffer&&o.Buffer.isBuffer(t),file:t=>"undefined"!=typeof File&&t instanceof File,htmlelement:t=>"undefined"!=typeof HTMLElement&&t instanceof HTMLElement,object:t=>"object"==typeof t&&null!==t},order:["undefined","null","boolean","number","bigint","string","symbol","function","array","buffer","file","date","regexp","map","set","weakmap","weakset","promise","htmlelement","object"]};function u(t,e){const r=[];for(const[i,n]of Object.entries(t))if(!h.items.hasOwnProperty(i)){h.items[i]=n;let t="number"==typeof e?e:-1;if(-1===t){const e=h.order.indexOf("object");t=e>-1?e:h.order.length}t=Math.min(Math.max(0,t),h.order.length),h.order.splice(t,0,i),r.push(i)}return r}function f(t){const e=[...h.order];return!!t.every((t=>e.includes(t)))&&(h.order=t.slice(),!0)}function l(){return[...h.order]}const c=t=>{if(null===t)return"null";for(const e of h.order)if(!h.items[e]||h.items[e](t))return e;return"unknown"};function d(t,e){if(void 0===t)return null;const r=c(t);return"string"==typeof e?r===e.toLowerCase():r}function p(t){return Array.isArray(t)?t.length:d(t,"object")?Object.keys(t).length:0}function m(t,e,r,i){return i?Number(t*e)/r:Number(r*e)/t}function g(t,e){return t*(e/100)}function y(t=0,e=null){if(null!=t&&0!==t){const r=new Date(t);if(Number.isNaN(r.getTime()))return null;const i=e instanceof Date?e:new Date;let n=i.getFullYear()-r.getFullYear();const a=i.getMonth(),s=r.getMonth(),o=i.getDate(),h=r.getDate();return(a<s||a===s&&o<h)&&n--,Math.abs(n)}return null}function v(t){return t.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()))}function b(t){const e=t.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()));return e.charAt(0).toLowerCase()+e.slice(1)}var w=__webpack_require__(1565),M=__webpack_require__(3766);const _="undefined"!=typeof window&&void 0!==window.document,S=class{constructor(t={}){this.algorithm=t.algorithm||"aes-256-gcm",this.authTagLength=t.authTagLength||16,this.key=t.key||this.generateKey(),this.outputEncoding=t.outputEncoding||"hex",this.inputEncoding=t.inputEncoding||"utf8"}generateKey(t=32){return(0,w.po)(t)}generateIV(t=12){return(0,w.po)(t)}encrypt(t,e=this.generateIV()){const r=this.#t(t),i=(0,w.Tt)(this.algorithm,this.key,e,{authTagLength:this.authTagLength});let n=i.update(r,this.inputEncoding);n=o.Buffer.concat([n,i.final()]);const a=i.getAuthTag();return{iv:e.toString(this.outputEncoding),encrypted:n.toString(this.outputEncoding),authTag:a.toString(this.outputEncoding)}}decrypt({iv:t,encrypted:e,authTag:r},i=null){const n=o.Buffer.from(t,this.outputEncoding),a=o.Buffer.from(e,this.outputEncoding),s=o.Buffer.from(r,this.outputEncoding),h=(0,w._7)(this.algorithm,this.key,n,{authTagLength:this.authTagLength});h.setAuthTag(s);let u=h.update(a,null,this.inputEncoding);u+=h.final(this.inputEncoding);const{value:f,type:l}=this.#e(u);return i&&this.#r(i,l),f}getTypeFromEncrypted({iv:t,encrypted:e,authTag:r}){const i=o.Buffer.from(t,this.outputEncoding),n=o.Buffer.from(e,this.outputEncoding),a=o.Buffer.from(r,this.outputEncoding),s=(0,w._7)(this.algorithm,this.key,i,{authTagLength:this.authTagLength});s.setAuthTag(a);let h=s.update(n,null,this.inputEncoding);h+=s.final(this.inputEncoding);const{type:u}=this.#e(h);return"string"==typeof u?u:"unknown"}saveKeyToFile(t="secret.key"){const e=this.key.toString("hex");if(_){const r=new Blob([e],{type:"text/plain"}),i=URL.createObjectURL(r),n=document.createElement("a");n.href=i,n.download=t,n.click(),URL.revokeObjectURL(i)}else M.writeFileSync(t,e)}saveConfigToFile(t="crypto-config.json"){const e=JSON.stringify(this.exportConfig(),null,2);if(_){const r=new Blob([e],{type:"application/json"}),i=URL.createObjectURL(r),n=document.createElement("a");n.href=i,n.download=t,n.click(),URL.revokeObjectURL(i)}else M.writeFileSync(t,e)}async loadConfigFromFile(t){if(_)return new Promise(((e,r)=>{if(!(t instanceof File))return r(new Error("In browser, the file must be a File object"));const i=new FileReader;i.onload=()=>{try{const t="string"==typeof i.result?JSON.parse(i.result):{};e(this.importConfig(t))}catch(t){r(new Error("Invalid config JSON file"))}},i.onerror=()=>r(i.error),i.readAsText(t)}));{const e=M.readFileSync(t,"utf8"),r=JSON.parse(e);return this.importConfig(r)}}async loadKeyFromFile(t){if(_)return new Promise(((e,r)=>{if(!(t instanceof File))return r(new Error("In browser, the file must be a File object"));const i=new FileReader;i.onload=()=>{const t="string"==typeof i.result?i.result.trim():"",r=o.Buffer.from(t,"hex");this.key=r,e(r)},i.onerror=()=>r(i.error),i.readAsText(t)}));{const e=M.readFileSync(t,"utf8"),r=o.Buffer.from(e,"hex");return this.key=r,r}}exportConfig(){return{algorithm:this.algorithm,outputEncoding:this.outputEncoding,inputEncoding:this.inputEncoding,key:this.key.toString("hex"),authTagLength:this.authTagLength}}importConfig(t){if("string"==typeof t.algorithm)this.algorithm=t.algorithm;else if(void 0!==t.algorithm)throw new Error('Invalid or missing "algorithm" property. Expected a string.');if("string"==typeof t.outputEncoding)this.outputEncoding=t.outputEncoding;else if(void 0!==t.outputEncoding)throw new Error('Invalid or missing "outputEncoding" property. Expected a string.');if("string"==typeof t.inputEncoding)this.inputEncoding=t.inputEncoding;else if(void 0!==t.inputEncoding)throw new Error('Invalid or missing "inputEncoding" property. Expected a string.');if("number"==typeof t.authTagLength)this.authTagLength=t.authTagLength;else if(void 0!==t.authTagLength)throw new Error('Invalid or missing "authTagLength" property. Expected a number.');if("string"==typeof t.key)this.key=o.Buffer.from(t.key,"hex");else if(void 0!==t.key)throw new Error('Invalid or missing "key" property. Expected a hexadecimal string.')}#i={weakmap:()=>{throw new Error("WeakMap cannot be serialized")},weakset:()=>{throw new Error("WeakSet cannot be serialized")},promise:()=>{throw new Error("Promise cannot be serialized")},function:()=>{throw new Error("Function cannot be serialized")},regexp:t=>JSON.stringify({__type:"regexp",value:t.toString()}),htmlElement:t=>JSON.stringify({__type:"htmlelement",value:t.outerHTML}),date:t=>JSON.stringify({__type:"date",value:t.toISOString()}),bigint:t=>JSON.stringify({__type:"bigint",value:t.toString()}),number:t=>JSON.stringify({__type:"number",value:t}),boolean:t=>JSON.stringify({__type:"boolean",value:t}),string:t=>JSON.stringify({__type:"string",value:t}),null:()=>JSON.stringify({__type:"null"}),undefined:()=>JSON.stringify({__type:"undefined"}),map:t=>JSON.stringify({__type:"map",value:Array.from(t.entries())}),set:t=>JSON.stringify({__type:"set",value:Array.from(t.values())}),symbol:t=>JSON.stringify({__type:"symbol",value:t.description}),array:t=>JSON.stringify({__type:"array",value:t}),object:t=>JSON.stringify({__type:"object",value:t}),buffer:t=>JSON.stringify({__type:"buffer",value:t.toString("base64")})};#n={regexp:t=>{const e=t.match(/^\/(.*)\/([gimsuy]*)$/);return e?new RegExp(e[1],e[2]):new RegExp(t)},htmlelement:t=>{if("undefined"==typeof document)throw new Error("HTMLElement deserialization is only supported in browsers");const e=document.createElement("div");return e.innerHTML=t,e},date:t=>new Date(t),bigint:t=>BigInt(t),number:t=>Number(t),boolean:t=>Boolean(t),null:()=>null,undefined:()=>{},map:t=>new Map(t),set:t=>new Set(t),symbol:t=>Symbol(t),array:t=>t,object:t=>t,string:t=>String(t),buffer:t=>o.Buffer.from(t,"base64")};#t(t){const e=d(t)||"undefined";if("string"==typeof e&&this.#i[e])return this.#i[e](t);throw new Error(`Unsupported data type for encryption: ${e}`)}#e(t){try{const e=JSON.parse(t),r=e.__type;return"string"!=typeof r?{value:t,type:"string"}:"function"==typeof this.#n[r]?{value:this.#n[r](e.value),type:r}:{value:t,type:"Unknown"}}catch{return{value:t,type:"Unknown"}}}#r(t,e){if(t!==e)throw new Error(`Type mismatch: expected ${t}, but got ${e}`)}},E="undefined"!=typeof window&&void 0!==window.document,C=class{#a=/-----BEGIN CERTIFICATE-----([\s\S]+?)-----END CERTIFICATE-----/;#s=/-----BEGIN\s+(?:RSA\s+)?(PUBLIC|PRIVATE)\s+KEY-----([\s\S]+?)-----END\s+(?:RSA\s+)?\1\s+KEY-----/;constructor({publicCertPath:t=null,privateKeyPath:e=null,publicCertBuffer:r=null,privateKeyBuffer:i=null,cryptoType:n="RSA-OAEP"}={}){if(!t&&!r&&E)throw new Error("In browser, publicCertPath or publicCertBuffer must be provided");if(r&&"string"!=typeof r&&!o.Buffer.isBuffer(r))throw new TypeError("publicCertBuffer must be a string or Buffer");if(i&&"string"!=typeof i&&!o.Buffer.isBuffer(i))throw new TypeError("privateKeyBuffer must be a string or Buffer");this.source=null,this.cryptoType=n,this.publicCertPath=t,this.privateKeyPath=e,this.publicCertBuffer=r,this.privateKeyBuffer=i,this.publicKey=null,this.privateKey=null,this.publicCert=null,this.metadata=null,this.forge=null}async#o(){if(!this.forge){const t=await Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,9547,19));this.forge=t.default}return this.#h()}async fetchNodeForge(){return this.#o()}#h(){return this.forge}getNodeForge(){return this.#h()}#u(t){if(this.#a.test(t))return"certificate";const e=this.#s.exec(t);return e&&"string"==typeof e[1]?e[1].toLowerCase()+"_key":"unknown"}async generateX509Cert(t,e={}){if(this.publicKey||this.privateKey||this.publicCert)throw new Error("A certificate is already loaded into the instance.");const{pki:r}=await this.#o(),{modulusLength:i=2048,validityInYears:n=1,randomBytesLength:a=16}=e,{publicKey:s,privateKey:h}=r.rsa.generateKeyPair(i),u=r.publicKeyToPem(s),f=r.privateKeyToPem(h),{cert:l,publicPem:c,privatePem:d}=this.#f(t,u,f,n,a);return this.publicKey=c,this.privateKey=d,this.publicCertPath="MEMORY",this.privateKeyPath="MEMORY",this.source="memory",this.publicCertBuffer=o.Buffer.from(u),this.privateKeyBuffer=o.Buffer.from(f),this.#l(l),{publicKey:u,privateKey:f,cert:l}}#f(t,e,r,i,n){const{pki:a}=this.forge,s=a.createCertificate(),h=a.publicKeyFromPem(e),u=a.privateKeyFromPem(r);s.publicKey=h,s.serialNumber=o.Buffer.from(this.forge.random.getBytesSync(n)).toString("hex"),s.validity.notBefore=new Date,s.validity.notAfter=new Date,s.validity.notAfter.setFullYear(s.validity.notBefore.getFullYear()+i);const f=[];for(const e in t)f.push({name:e,value:t[e]});return s.setSubject(f),s.setIssuer(f),s.sign(u),{cert:a.certificateToPem(s),publicPem:h,privatePem:u}}async init(){if(this.publicKey||this.privateKey||this.publicCert)throw new Error("A certificate is already loaded into the instance.");if(!this.publicCertPath&&!this.publicCertBuffer)throw new Error("Public certificate is required to initialize");this.metadata={};const{pki:t}=await this.#o(),e=e=>{if("string"!=typeof e)throw new Error("Expected publicPem to be a string containing a PEM-encoded key or certificate.");const r=this.#u(e);if("certificate"===r){const r=t.certificateFromPem(e);this.publicKey=r.publicKey,this.#l(r)}else{if("public_key"!==r)throw new Error("Public key is required to initialize");this.publicKey=t.publicKeyFromPem(e)}},r=e=>{if("string"!=typeof e)throw new Error("Expected privatePem to be a string containing a PEM-encoded private key.");if("private_key"!==this.#u(e))throw new Error("Private key is required to initialize");this.privateKey=t.privateKeyFromPem(e)};if("string"!=typeof this.publicCertPath)throw new TypeError("Expected 'publicCertPath' to be a string, but got "+typeof this.publicCertPath);if("string"!=typeof this.privateKeyPath)throw new TypeError("Expected 'privateKeyPath' to be a string, but got "+typeof this.privateKeyPath);if(E)e(this.publicCertBuffer?"string"==typeof this.publicCertBuffer?this.publicCertBuffer:(new TextDecoder).decode(this.publicCertBuffer):await fetch(this.publicCertPath).then((t=>t.text()))),(this.privateKeyPath||this.privateKeyBuffer)&&r(this.privateKeyBuffer?"string"==typeof this.privateKeyBuffer?this.privateKeyBuffer:(new TextDecoder).decode(this.privateKeyBuffer):await fetch(this.privateKeyPath).then((t=>t.text()))),this.source="url";else{const t=!!this.publicCertBuffer,i=!!this.privateKeyBuffer;e(t?"string"==typeof this.publicCertBuffer?this.publicCertBuffer:o.Buffer.isBuffer(this.publicCertBuffer)?this.publicCertBuffer.toString("utf-8"):null:M.readFileSync(this.publicCertPath,"utf-8")),(this.privateKeyPath||this.privateKeyBuffer)&&r(i?"string"==typeof this.privateKeyBuffer?this.privateKeyBuffer:o.Buffer.isBuffer(this.privateKeyBuffer)?this.privateKeyBuffer.toString("utf-8"):null:M.readFileSync(this.privateKeyPath,"utf-8")),this.source=this.publicCertBuffer||this.privateKeyBuffer?"memory":"file"}}#l(t){try{const{pki:e}=this.forge,r="string"==typeof t?e.certificateFromPem(t):t;this.publicCert=r;const i=t=>{const e={},r={},i=t.map((t=>`${t.shortName}=${t.value}`)).join(",");for(const i of t)e[i.name]=i.value,r[i.shortName]=i.value;return{names:e,shortNames:r,raw:i}};this.metadata={subject:i(r.subject.attributes),issuer:i(r.issuer.attributes),serialNumber:r.serialNumber,validFrom:r.validity.notBefore,validTo:r.validity.notAfter}}catch(t){throw new Error(`Failed to parse X.509 certificate in browser: ${t instanceof Error&&"string"==typeof t.message?t.message:"Unknown error"}`)}}extractCertMetadata(){return this.metadata||{}}encryptJson(t){if(!this.publicKey)throw new Error("Public key is not initialized. Call init() or generateKeyPair() first.");const e=JSON.stringify(t),r=this.publicKey.encrypt(e,this.cryptoType);return this.forge.util.encode64(r)}decryptToJson(t){if(!this.privateKey)throw new Error("Private key is required for decryption");const e=this.forge.util.decode64(t),r=this.privateKey.decrypt(e,this.cryptoType);return JSON.parse(r)}hasKeys(){return null!==this.publicKey&&null!==this.privateKey}hasCert(){return null!==this.publicCert}reset(){this.publicKey=null,this.privateKey=null,this.publicCert=null,this.metadata=null,this.source=null}}})(),window.TinyEssentials=__webpack_exports__})();