@wormhole-foundation/wormhole-connect 0.3.20-beta.2-development → 0.3.20-beta.3-development

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 (103) hide show
  1. package/dist/assets/{ccip-DdNm3TF5.js → ccip-CEh7qOGs.js} +1 -1
  2. package/dist/assets/{evm-CKqqF_gg.js → evm-BMVFqnvw.js} +4 -4
  3. package/dist/assets/{index-DCoDtnSU.js → index-Bmag2z4V.js} +2 -2
  4. package/dist/assets/{index-3j5fAG22.js → index-CdswXJGj.js} +1 -1
  5. package/dist/assets/{index.es-C0U6RTlJ.js → index.es-CHyddDTZ.js} +2 -2
  6. package/dist/main.js +6 -6
  7. package/dist/src/components/ConnectWallet.d.ts.map +1 -1
  8. package/dist/src/views/WalletModal.d.ts.map +1 -1
  9. package/lib/{algorand-C42rWZhH.mjs → algorand-CksHf-nC.mjs} +4 -4
  10. package/lib/{algorand-Cbas9Znf.js → algorand-D63qAh_0.js} +1 -1
  11. package/lib/{aptos-F1YTs7RF.js → aptos-BYKoW69E.js} +1 -1
  12. package/lib/{aptos-CKQLwso5.mjs → aptos-BovHb62p.mjs} +2 -2
  13. package/lib/{aptos-Db9jr6Zj.mjs → aptos-ah8FA8Kh.mjs} +4 -4
  14. package/lib/{aptos-BEj1KbgQ.js → aptos-dgPXPfjQ.js} +2 -2
  15. package/lib/{browser-DhMUdQaV.js → browser-BX61K5uA.js} +1 -1
  16. package/lib/{browser-yMGaDO6I.mjs → browser-DefkXlAB.mjs} +2 -2
  17. package/lib/{ccip-CugBSg-r.js → ccip-DEcCBznF.js} +1 -1
  18. package/lib/{ccip-Xn9GhzKj.mjs → ccip-T0xk_rVW.mjs} +1 -1
  19. package/lib/{chain-Cn2ZNybw.js → chain-DESUv4bK.js} +1 -1
  20. package/lib/{chain-Cr3doQOx.mjs → chain-W4Reg-jx.mjs} +1 -1
  21. package/lib/{constants-J-2u_jlI.js → constants-Bl4uBq_U.js} +1 -1
  22. package/lib/{constants-BzLgb7Uu.mjs → constants-DNe7TeKH.mjs} +1 -1
  23. package/lib/{cosmos-Y-IU1Ppo.js → cosmos-CKM4kpVV.js} +1 -1
  24. package/lib/{cosmos-Cxz97m-S.mjs → cosmos-nU5ZbUmb.mjs} +3 -3
  25. package/lib/{cosmwasm-CNBqqZki.js → cosmwasm-B4a7aEbr.js} +2 -2
  26. package/lib/{cosmwasm-DXTIPYzt.mjs → cosmwasm-DH2dSUxf.mjs} +6 -6
  27. package/lib/{create-Sh6YOFDG.mjs → create-DXtwSaGk.mjs} +1 -1
  28. package/lib/{create-BxMuI9LT.js → create-sKIrLo5f.js} +1 -1
  29. package/lib/{ens-validation.es6-0JM8LWw0.mjs → ens-validation.es6-BBMnE4UL.mjs} +2 -2
  30. package/lib/{ens-validation.es6-C69MtHHj.js → ens-validation.es6-cB46D52E.js} +1 -1
  31. package/lib/{evm-6mHBMvQY.js → evm-CDNdFiVY.js} +4 -4
  32. package/lib/{evm-Bmxn_-Fq.mjs → evm-ChDzlw1v.mjs} +6 -6
  33. package/lib/{evm-2YfDqIgh.mjs → evm-DHGTXHXl.mjs} +6 -6
  34. package/lib/{evm-CNwWpuUy.js → evm-ivqxGCPw.js} +2 -2
  35. package/lib/{index-qhCBneZC.mjs → index-2B9fTTgC.mjs} +4 -4
  36. package/lib/{index-Cy7ifYs5.js → index-6fKsS_Ak.js} +1 -1
  37. package/lib/{index-BHGrmD13.js → index-B1ojvQzq.js} +1 -1
  38. package/lib/{index-BQxLsVB0.js → index-B6Vej3hm.js} +1 -1
  39. package/lib/{index-DKG3HddZ.js → index-BAJoDFMP.js} +1 -1
  40. package/lib/{index-D9E9_uH-.js → index-BDmx_rJ8.js} +1 -1
  41. package/lib/{index-CzG0cgVl.js → index-BEw9DWLc.js} +1 -1
  42. package/lib/{index--8rKiIkr.mjs → index-BOi-Jam_.mjs} +3 -3
  43. package/lib/{index-B4KykMqE.mjs → index-BTwe5rFf.mjs} +2 -2
  44. package/lib/{index-CSC8gV3x.js → index-BXHI118v.js} +1 -1
  45. package/lib/{index-MdvWz0xU.mjs → index-BczaI6ny.mjs} +56 -41
  46. package/lib/{index-E3J37Ufa.mjs → index-BdHhHhEK.mjs} +4 -4
  47. package/lib/{index-CZTDsE_a.js → index-BdlJaWR9.js} +1 -1
  48. package/lib/{index-kU6hfRjL.js → index-Bk5b__uz.js} +1 -1
  49. package/lib/{index-d2mNVM5g.mjs → index-BmkQB7mD.mjs} +4 -4
  50. package/lib/{index-bpTOt1KJ.js → index-BqPnD-p6.js} +1 -1
  51. package/lib/{index-9Ztr7evQ.js → index-C0VhGw21.js} +1 -1
  52. package/lib/{index-C0HEAh9V.mjs → index-C3soDe1H.mjs} +5 -5
  53. package/lib/{index-pt7Ykf4X.js → index-C5RpglHM.js} +1 -1
  54. package/lib/{index-BEUdOtQ4.mjs → index-C7PDQQH4.mjs} +1 -1
  55. package/lib/{index-B-dHQ1eQ.js → index-C8h2vQJZ.js} +1 -1
  56. package/lib/{index-9tpTQOlv.js → index-CHt0Dq8R.js} +1 -1
  57. package/lib/{index-Dkni0NGA.js → index-CNN5-hWl.js} +1 -1
  58. package/lib/{index-tKhs-WV9.mjs → index-CPD4t9J5.mjs} +4 -4
  59. package/lib/{index-CP809oMf.mjs → index-CPlJ0KAn.mjs} +2 -2
  60. package/lib/{index-Db9fx8vT.mjs → index-CXtObjgh.mjs} +3 -3
  61. package/lib/{index-B-QSGC7b.mjs → index-Caureu7-.mjs} +5 -5
  62. package/lib/{index-O_j9XFw3.js → index-CnkI51jx.js} +1 -1
  63. package/lib/{index-BoNvLS-N.mjs → index-Cq7_6fnd.mjs} +4 -4
  64. package/lib/{index-C7YZnpfO.mjs → index-CyUNpU91.mjs} +4 -4
  65. package/lib/{index-PCAxot3y.mjs → index-D1xFkyWK.mjs} +3 -3
  66. package/lib/{index-DrtrF3dG.js → index-D9_icWgq.js} +1 -1
  67. package/lib/{index-BQwAGLXV.mjs → index-DC9jOEYD.mjs} +4 -4
  68. package/lib/{index-DihGlmwO.mjs → index-DIw6mTJY.mjs} +5 -5
  69. package/lib/{index-EA3-t_Qq.mjs → index-DNiGjg6q.mjs} +2 -2
  70. package/lib/{index-BwiAAhG8.js → index-DfFjBHmw.js} +1 -1
  71. package/lib/{index-CPz1Acuo.js → index-DgC-9oPt.js} +1 -1
  72. package/lib/{index-8gU2g7yf.mjs → index-DjKeoY4m.mjs} +4 -4
  73. package/lib/{index-ClXBhJ0W.mjs → index-DnM2fNFZ.mjs} +1 -1
  74. package/lib/{index-DB0a8u4r.js → index-DqeiB68_.js} +1 -1
  75. package/lib/{index-BcB_yKKW.js → index-DwcGra2Y.js} +1 -1
  76. package/lib/{index-DRUAUgNl.mjs → index-HQr2H4S3.mjs} +4 -4
  77. package/lib/{index-CfLwiYOK.mjs → index-WUmJ5o5x.mjs} +5 -5
  78. package/lib/{index-BQYVWsSs.mjs → index-Y6lJNdxz.mjs} +4 -4
  79. package/lib/{index-CvHTtSDS.js → index-nk-Z22as.js} +6 -6
  80. package/lib/{index-BG-65hXv.js → index-qiskyaec.js} +1 -1
  81. package/lib/{index.es-BGLcfmEq.mjs → index.es-D2Z6WbrX.mjs} +4 -4
  82. package/lib/{index.es-CrI023EX.js → index.es-DyFNXdF2.js} +2 -2
  83. package/lib/index.js +1 -1
  84. package/lib/index.mjs +1 -1
  85. package/lib/{libsodium-wrappers-ClbmX2fx.js → libsodium-wrappers-BpvsutBP.js} +1 -1
  86. package/lib/{libsodium-wrappers-BCnMqPBR.mjs → libsodium-wrappers-XJBOztDV.mjs} +1 -1
  87. package/lib/{sei-2ilailX5.mjs → sei-BvWM-9uy.mjs} +3 -3
  88. package/lib/{sei-BUWJJNPx.js → sei-DZTZBksS.js} +1 -1
  89. package/lib/{solana-DzEXI4x4.mjs → solana-BGgv5A-r.mjs} +6 -6
  90. package/lib/{solana-DWgKegjl.js → solana-BQ7q5qa6.js} +1 -1
  91. package/lib/{solana-BbkZSoJO.mjs → solana-DZGFYmED.mjs} +4 -4
  92. package/lib/{solana-B1NFFf-A.js → solana-kGlH38Gh.js} +2 -2
  93. package/lib/{solanaEmbed.esm-CoFrO8bm.mjs → solanaEmbed.esm-BSxJdaVr.mjs} +2 -2
  94. package/lib/{solanaEmbed.esm-D_4gBD-W.js → solanaEmbed.esm-DLccNxIY.js} +1 -1
  95. package/lib/src/components/ConnectWallet.d.ts.map +1 -1
  96. package/lib/src/views/WalletModal.d.ts.map +1 -1
  97. package/lib/{sui-Cg0WA-kZ.mjs → sui-ByOI3kYe.mjs} +4 -4
  98. package/lib/{sui-Z1wu4BUG.mjs → sui-CL8w06Io.mjs} +2 -2
  99. package/lib/{sui-DHuzLior.js → sui-DSNK2SCY.js} +2 -2
  100. package/lib/{sui-rauXckty.js → sui-Ky0-4pfR.js} +1 -1
  101. package/lib/{unsignedTransaction-C7qYSgcK.mjs → unsignedTransaction-CfXY_-_P.mjs} +2 -2
  102. package/lib/{unsignedTransaction-T5_2g-jm.js → unsignedTransaction-DO4HKGzM.js} +1 -1
  103. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";const x=require("./index-CvHTtSDS.js"),j1=require("./index-BcB_yKKW.js");var L2=function(){return L2=Object.assign||function(r){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var D in n)Object.prototype.hasOwnProperty.call(n,D)&&(r[D]=n[D])}return r},L2.apply(this,arguments)};var Fe={exports:{}};const tt=u=>typeof u=="object"&&u!==null,nt=Symbol("skip"),qe=u=>tt(u)&&!(u instanceof RegExp)&&!(u instanceof Error)&&!(u instanceof Date),R9=(u,r,n,i=new WeakMap)=>{if(n={deep:!1,target:{},...n},i.has(u))return i.get(u);i.set(u,n.target);const{target:o}=n;delete n.target;const D=E=>E.map(c=>qe(c)?R9(c,r,n,i):c);if(Array.isArray(u))return D(u);for(const[E,c]of Object.entries(u)){const p=r(E,c,u);if(p===nt)continue;let[m,v,{shouldRecurse:I=!0}={}]=p;m!=="__proto__"&&(n.deep&&I&&qe(v)&&(v=Array.isArray(v)?D(v):R9(v,r,n,i)),o[m]=v)}return o};Fe.exports=(u,r,n)=>{if(!tt(u))throw new TypeError(`Expected an object, got \`${u}\` (${typeof u})`);return R9(u,r,n)};Fe.exports.mapObjectSkip=nt;var J6=Fe.exports;function X6(u){return u.toLowerCase()}var Q6=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],u8=/[^A-Z0-9]+/gi;function e8(u,r){r===void 0&&(r={});for(var n=r.splitRegexp,i=n===void 0?Q6:n,o=r.stripRegexp,D=o===void 0?u8:o,E=r.transform,c=E===void 0?X6:E,p=r.delimiter,m=p===void 0?" ":p,v=Ze(Ze(u,i,"$1\0$2"),D,"\0"),I=0,M=v.length;v.charAt(I)==="\0";)I++;for(;v.charAt(M-1)==="\0";)M--;return v.slice(I,M).split("\0").map(c).join(m)}function Ze(u,r,n){return r instanceof RegExp?u.replace(r,n):r.reduce(function(i,o){return i.replace(o,n)},u)}function r8(u,r){return r===void 0&&(r={}),e8(u,L2({delimiter:"."},r))}function t8(u,r){return r===void 0&&(r={}),r8(u,L2({delimiter:"_"},r))}const n8=Object.freeze(Object.defineProperty({__proto__:null,snakeCase:t8},Symbol.toStringTag,{value:"Module"})),D8=x.getAugmentedNamespace(n8),i8=J6,{snakeCase:a8}=D8;var o8=function(u,r){return r=Object.assign({deep:!0,exclude:[],parsingOptions:{}},r),i8(u,function(n,i){return[s8(r.exclude,n)?n:a8(n,r.parsingOptions),i]},r)};function s8(u,r){return u.some(function(n){return typeof n=="string"?n===r:n.test(r)})}const f8=x.getDefaultExportFromCjs(o8);var Dt={exports:{}};(function(u,r){(function(n,i){u.exports=i()})(x.commonjsGlobal,function(){return n={418:function(o,D){(function(E,c){for(var p in c)E[p]=c[p]})(D,function(E){var c={};function p(m){if(c[m])return c[m].exports;var v=c[m]={i:m,l:!1,exports:{}};return E[m].call(v.exports,v,v.exports,p),v.l=!0,v.exports}return p.m=E,p.c=c,p.i=function(m){return m},p.d=function(m,v,I){p.o(m,v)||Object.defineProperty(m,v,{configurable:!1,enumerable:!0,get:I})},p.n=function(m){var v=m&&m.__esModule?function(){return m.default}:function(){return m};return p.d(v,"a",v),v},p.o=function(m,v){return Object.prototype.hasOwnProperty.call(m,v)},p.p="",p(p.s=1)}([function(E,c,p){Object.defineProperty(c,"__esModule",{value:!0});var m=p(3),v=function(){function I(M,k){M===void 0&&(M={}),k===void 0&&(k={splitValues:!1});var b,N=this;this.headersMap={},M&&(typeof Headers<"u"&&M instanceof Headers?m.getHeaderKeys(M).forEach(function(g){m.getHeaderValues(M,g).forEach(function(_){k.splitValues?N.append(g,m.splitHeaderValue(_)):N.append(g,_)})}):typeof(b=M)=="object"&&typeof b.headersMap=="object"&&typeof b.forEach=="function"?M.forEach(function(g,_){N.append(g,_)}):typeof Map<"u"&&M instanceof Map?M.forEach(function(g,_){N.append(_,g)}):typeof M=="string"?this.appendFromString(M):typeof M=="object"&&Object.getOwnPropertyNames(M).forEach(function(g){var _=M[g];Array.isArray(_)?_.forEach(function(y){N.append(g,y)}):N.append(g,_)}))}return I.prototype.appendFromString=function(M){for(var k=M.split(`\r
1
+ "use strict";const x=require("./index-nk-Z22as.js"),j1=require("./index-DwcGra2Y.js");var L2=function(){return L2=Object.assign||function(r){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var D in n)Object.prototype.hasOwnProperty.call(n,D)&&(r[D]=n[D])}return r},L2.apply(this,arguments)};var Fe={exports:{}};const tt=u=>typeof u=="object"&&u!==null,nt=Symbol("skip"),qe=u=>tt(u)&&!(u instanceof RegExp)&&!(u instanceof Error)&&!(u instanceof Date),R9=(u,r,n,i=new WeakMap)=>{if(n={deep:!1,target:{},...n},i.has(u))return i.get(u);i.set(u,n.target);const{target:o}=n;delete n.target;const D=E=>E.map(c=>qe(c)?R9(c,r,n,i):c);if(Array.isArray(u))return D(u);for(const[E,c]of Object.entries(u)){const p=r(E,c,u);if(p===nt)continue;let[m,v,{shouldRecurse:I=!0}={}]=p;m!=="__proto__"&&(n.deep&&I&&qe(v)&&(v=Array.isArray(v)?D(v):R9(v,r,n,i)),o[m]=v)}return o};Fe.exports=(u,r,n)=>{if(!tt(u))throw new TypeError(`Expected an object, got \`${u}\` (${typeof u})`);return R9(u,r,n)};Fe.exports.mapObjectSkip=nt;var J6=Fe.exports;function X6(u){return u.toLowerCase()}var Q6=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],u8=/[^A-Z0-9]+/gi;function e8(u,r){r===void 0&&(r={});for(var n=r.splitRegexp,i=n===void 0?Q6:n,o=r.stripRegexp,D=o===void 0?u8:o,E=r.transform,c=E===void 0?X6:E,p=r.delimiter,m=p===void 0?" ":p,v=Ze(Ze(u,i,"$1\0$2"),D,"\0"),I=0,M=v.length;v.charAt(I)==="\0";)I++;for(;v.charAt(M-1)==="\0";)M--;return v.slice(I,M).split("\0").map(c).join(m)}function Ze(u,r,n){return r instanceof RegExp?u.replace(r,n):r.reduce(function(i,o){return i.replace(o,n)},u)}function r8(u,r){return r===void 0&&(r={}),e8(u,L2({delimiter:"."},r))}function t8(u,r){return r===void 0&&(r={}),r8(u,L2({delimiter:"_"},r))}const n8=Object.freeze(Object.defineProperty({__proto__:null,snakeCase:t8},Symbol.toStringTag,{value:"Module"})),D8=x.getAugmentedNamespace(n8),i8=J6,{snakeCase:a8}=D8;var o8=function(u,r){return r=Object.assign({deep:!0,exclude:[],parsingOptions:{}},r),i8(u,function(n,i){return[s8(r.exclude,n)?n:a8(n,r.parsingOptions),i]},r)};function s8(u,r){return u.some(function(n){return typeof n=="string"?n===r:n.test(r)})}const f8=x.getDefaultExportFromCjs(o8);var Dt={exports:{}};(function(u,r){(function(n,i){u.exports=i()})(x.commonjsGlobal,function(){return n={418:function(o,D){(function(E,c){for(var p in c)E[p]=c[p]})(D,function(E){var c={};function p(m){if(c[m])return c[m].exports;var v=c[m]={i:m,l:!1,exports:{}};return E[m].call(v.exports,v,v.exports,p),v.l=!0,v.exports}return p.m=E,p.c=c,p.i=function(m){return m},p.d=function(m,v,I){p.o(m,v)||Object.defineProperty(m,v,{configurable:!1,enumerable:!0,get:I})},p.n=function(m){var v=m&&m.__esModule?function(){return m.default}:function(){return m};return p.d(v,"a",v),v},p.o=function(m,v){return Object.prototype.hasOwnProperty.call(m,v)},p.p="",p(p.s=1)}([function(E,c,p){Object.defineProperty(c,"__esModule",{value:!0});var m=p(3),v=function(){function I(M,k){M===void 0&&(M={}),k===void 0&&(k={splitValues:!1});var b,N=this;this.headersMap={},M&&(typeof Headers<"u"&&M instanceof Headers?m.getHeaderKeys(M).forEach(function(g){m.getHeaderValues(M,g).forEach(function(_){k.splitValues?N.append(g,m.splitHeaderValue(_)):N.append(g,_)})}):typeof(b=M)=="object"&&typeof b.headersMap=="object"&&typeof b.forEach=="function"?M.forEach(function(g,_){N.append(g,_)}):typeof Map<"u"&&M instanceof Map?M.forEach(function(g,_){N.append(_,g)}):typeof M=="string"?this.appendFromString(M):typeof M=="object"&&Object.getOwnPropertyNames(M).forEach(function(g){var _=M[g];Array.isArray(_)?_.forEach(function(y){N.append(g,y)}):N.append(g,_)}))}return I.prototype.appendFromString=function(M){for(var k=M.split(`\r
2
2
  `),b=0;b<k.length;b++){var N=k[b],g=N.indexOf(":");if(g>0){var _=N.substring(0,g).trim(),y=N.substring(g+1).trim();this.append(_,y)}}},I.prototype.delete=function(M,k){var b=m.normalizeName(M);if(k===void 0)delete this.headersMap[b];else{var N=this.headersMap[b];if(N){var g=N.indexOf(k);g>=0&&N.splice(g,1),N.length===0&&delete this.headersMap[b]}}},I.prototype.append=function(M,k){var b=this,N=m.normalizeName(M);Array.isArray(this.headersMap[N])||(this.headersMap[N]=[]),Array.isArray(k)?k.forEach(function(g){b.headersMap[N].push(m.normalizeValue(g))}):this.headersMap[N].push(m.normalizeValue(k))},I.prototype.set=function(M,k){var b=m.normalizeName(M);if(Array.isArray(k)){var N=[];k.forEach(function(g){N.push(m.normalizeValue(g))}),this.headersMap[b]=N}else this.headersMap[b]=[m.normalizeValue(k)]},I.prototype.has=function(M,k){var b=this.headersMap[m.normalizeName(M)];if(!Array.isArray(b))return!1;if(k!==void 0){var N=m.normalizeValue(k);return b.indexOf(N)>=0}return!0},I.prototype.get=function(M){var k=this.headersMap[m.normalizeName(M)];return k!==void 0?k.concat():[]},I.prototype.forEach=function(M){var k=this;Object.getOwnPropertyNames(this.headersMap).forEach(function(b){M(b,k.headersMap[b])},this)},I.prototype.toHeaders=function(){if(typeof Headers<"u"){var M=new Headers;return this.forEach(function(k,b){b.forEach(function(N){M.append(k,N)})}),M}throw new Error("Headers class is not defined")},I}();c.BrowserHeaders=v},function(E,c,p){Object.defineProperty(c,"__esModule",{value:!0});var m=p(0);c.BrowserHeaders=m.BrowserHeaders},function(E,c,p){Object.defineProperty(c,"__esModule",{value:!0}),c.iterateHeaders=function(m,v){for(var I=m[Symbol.iterator](),M=I.next();!M.done;)v(M.value[0]),M=I.next()},c.iterateHeadersKeys=function(m,v){for(var I=m.keys(),M=I.next();!M.done;)v(M.value),M=I.next()}},function(E,c,p){Object.defineProperty(c,"__esModule",{value:!0});var m=p(2);c.normalizeName=function(v){if(typeof v!="string"&&(v=String(v)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(v))throw new TypeError("Invalid character in header field name");return v.toLowerCase()},c.normalizeValue=function(v){return typeof v!="string"&&(v=String(v)),v},c.getHeaderValues=function(v,I){var M=v;if(M instanceof Headers&&M.getAll)return M.getAll(I);var k=M.get(I);return k&&typeof k=="string"?[k]:k},c.getHeaderKeys=function(v){var I=v,M={},k=[];return I.keys?m.iterateHeadersKeys(I,function(b){M[b]||(M[b]=!0,k.push(b))}):I.forEach?I.forEach(function(b,N){M[N]||(M[N]=!0,k.push(N))}):m.iterateHeaders(I,function(b){var N=b[0];M[N]||(M[N]=!0,k.push(N))}),k},c.splitHeaderValue=function(v){var I=[];return v.split(", ").forEach(function(M){M.split(",").forEach(function(k){I.push(k)})}),I}}]))},617:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.ChunkParser=D.ChunkType=D.encodeASCII=D.decodeASCII=void 0;var c,p=E(65);function m(g){return(_=g)===9||_===10||_===13||g>=32&&g<=126;var _}function v(g){for(var _=0;_!==g.length;++_)if(!m(g[_]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(g))}function I(g){return(128&g.getUint8(0))==128}function M(g){return g.getUint32(1,!1)}function k(g,_,y){return g.byteLength-_>=y}function b(g,_,y){if(g.slice)return g.slice(_,y);var S=g.length;y!==void 0&&(S=y);for(var O=new Uint8Array(S-_),uu=0,J=_;J<S;J++)O[uu++]=g[J];return O}D.decodeASCII=v,D.encodeASCII=function(g){for(var _=new Uint8Array(g.length),y=0;y!==g.length;++y){var S=g.charCodeAt(y);if(!m(S))throw new Error("Metadata contains invalid ASCII");_[y]=S}return _},function(g){g[g.MESSAGE=1]="MESSAGE",g[g.TRAILERS=2]="TRAILERS"}(c=D.ChunkType||(D.ChunkType={}));var N=function(){function g(){this.buffer=null,this.position=0}return g.prototype.parse=function(_,y){if(_.length===0&&y)return[];var S,O=[];if(this.buffer==null)this.buffer=_,this.position=0;else if(this.position===this.buffer.byteLength)this.buffer=_,this.position=0;else{var uu=this.buffer.byteLength-this.position,J=new Uint8Array(uu+_.byteLength),nu=b(this.buffer,this.position);J.set(nu,0);var Du=new Uint8Array(_);J.set(Du,uu),this.buffer=J,this.position=0}for(;;){if(!k(this.buffer,this.position,5))return O;var Z=b(this.buffer,this.position,this.position+5),au=new DataView(Z.buffer,Z.byteOffset,Z.byteLength),h=M(au);if(!k(this.buffer,this.position,5+h))return O;var e=b(this.buffer,this.position+5,this.position+5+h);if(this.position+=5+h,I(au))return O.push({chunkType:c.TRAILERS,trailers:(S=e,new p.Metadata(v(S)))}),O;O.push({chunkType:c.MESSAGE,data:e})}},g}();D.ChunkParser=N},8:function(o,D){var E;Object.defineProperty(D,"__esModule",{value:!0}),D.httpStatusToCode=D.Code=void 0,function(c){c[c.OK=0]="OK",c[c.Canceled=1]="Canceled",c[c.Unknown=2]="Unknown",c[c.InvalidArgument=3]="InvalidArgument",c[c.DeadlineExceeded=4]="DeadlineExceeded",c[c.NotFound=5]="NotFound",c[c.AlreadyExists=6]="AlreadyExists",c[c.PermissionDenied=7]="PermissionDenied",c[c.ResourceExhausted=8]="ResourceExhausted",c[c.FailedPrecondition=9]="FailedPrecondition",c[c.Aborted=10]="Aborted",c[c.OutOfRange=11]="OutOfRange",c[c.Unimplemented=12]="Unimplemented",c[c.Internal=13]="Internal",c[c.Unavailable=14]="Unavailable",c[c.DataLoss=15]="DataLoss",c[c.Unauthenticated=16]="Unauthenticated"}(E=D.Code||(D.Code={})),D.httpStatusToCode=function(c){switch(c){case 0:return E.Internal;case 200:return E.OK;case 400:return E.InvalidArgument;case 401:return E.Unauthenticated;case 403:return E.PermissionDenied;case 404:return E.NotFound;case 409:return E.Aborted;case 412:return E.FailedPrecondition;case 429:return E.ResourceExhausted;case 499:return E.Canceled;case 500:return E.Unknown;case 501:return E.Unimplemented;case 503:return E.Unavailable;case 504:return E.DeadlineExceeded;default:return E.Unknown}}},934:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.client=void 0;var c=E(65),p=E(617),m=E(8),v=E(346),I=E(57),M=E(882);D.client=function(N,g){return new k(N,g)};var k=function(){function N(g,_){this.started=!1,this.sentFirstMessage=!1,this.completed=!1,this.closed=!1,this.finishedSending=!1,this.onHeadersCallbacks=[],this.onMessageCallbacks=[],this.onEndCallbacks=[],this.parser=new p.ChunkParser,this.methodDefinition=g,this.props=_,this.createTransport()}return N.prototype.createTransport=function(){var g=this.props.host+"/"+this.methodDefinition.service.serviceName+"/"+this.methodDefinition.methodName,_={methodDefinition:this.methodDefinition,debug:this.props.debug||!1,url:g,onHeaders:this.onTransportHeaders.bind(this),onChunk:this.onTransportChunk.bind(this),onEnd:this.onTransportEnd.bind(this)};this.props.transport?this.transport=this.props.transport(_):this.transport=I.makeDefaultTransport(_)},N.prototype.onTransportHeaders=function(g,_){if(this.props.debug&&v.debug("onHeaders",g,_),this.closed)this.props.debug&&v.debug("grpc.onHeaders received after request was closed - ignoring");else if(_!==0){this.responseHeaders=g,this.props.debug&&v.debug("onHeaders.responseHeaders",JSON.stringify(this.responseHeaders,null,2));var y=b(g);this.props.debug&&v.debug("onHeaders.gRPCStatus",y);var S=y&&y>=0?y:m.httpStatusToCode(_);this.props.debug&&v.debug("onHeaders.code",S);var O=g.get("grpc-message")||[];if(this.props.debug&&v.debug("onHeaders.gRPCMessage",O),this.rawOnHeaders(g),S!==m.Code.OK){var uu=this.decodeGRPCStatus(O[0]);this.rawOnError(S,uu,g)}}},N.prototype.onTransportChunk=function(g){var _=this;if(this.closed)this.props.debug&&v.debug("grpc.onChunk received after request was closed - ignoring");else{var y=[];try{y=this.parser.parse(g)}catch(S){return this.props.debug&&v.debug("onChunk.parsing error",S,S.message),void this.rawOnError(m.Code.Internal,"parsing error: "+S.message)}y.forEach(function(S){if(S.chunkType===p.ChunkType.MESSAGE){var O=_.methodDefinition.responseType.deserializeBinary(S.data);_.rawOnMessage(O)}else S.chunkType===p.ChunkType.TRAILERS&&(_.responseHeaders?(_.responseTrailers=new c.Metadata(S.trailers),_.props.debug&&v.debug("onChunk.trailers",_.responseTrailers)):(_.responseHeaders=new c.Metadata(S.trailers),_.rawOnHeaders(_.responseHeaders)))})}},N.prototype.onTransportEnd=function(){if(this.props.debug&&v.debug("grpc.onEnd"),this.closed)this.props.debug&&v.debug("grpc.onEnd received after request was closed - ignoring");else if(this.responseTrailers!==void 0){var g=b(this.responseTrailers);if(g!==null){var _=this.responseTrailers.get("grpc-message"),y=this.decodeGRPCStatus(_[0]);this.rawOnEnd(g,y,this.responseTrailers)}else this.rawOnError(m.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(this.responseHeaders===void 0)return void this.rawOnError(m.Code.Unknown,"Response closed without headers");var S=b(this.responseHeaders),O=this.responseHeaders.get("grpc-message");if(this.props.debug&&v.debug("grpc.headers only response ",S,O),S===null)return void this.rawOnEnd(m.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var uu=this.decodeGRPCStatus(O[0]);this.rawOnEnd(S,uu,this.responseHeaders)}},N.prototype.decodeGRPCStatus=function(g){if(!g)return"";try{return decodeURIComponent(g)}catch{return g}},N.prototype.rawOnEnd=function(g,_,y){var S=this;this.props.debug&&v.debug("rawOnEnd",g,_,y),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function(O){if(!S.closed)try{O(g,_,y)}catch(uu){setTimeout(function(){throw uu},0)}}))},N.prototype.rawOnHeaders=function(g){this.props.debug&&v.debug("rawOnHeaders",g),this.completed||this.onHeadersCallbacks.forEach(function(_){try{_(g)}catch(y){setTimeout(function(){throw y},0)}})},N.prototype.rawOnError=function(g,_,y){var S=this;y===void 0&&(y=new c.Metadata),this.props.debug&&v.debug("rawOnError",g,_),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function(O){if(!S.closed)try{O(g,_,y)}catch(uu){setTimeout(function(){throw uu},0)}}))},N.prototype.rawOnMessage=function(g){var _=this;this.props.debug&&v.debug("rawOnMessage",g.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach(function(y){if(!_.closed)try{y(g)}catch(S){setTimeout(function(){throw S},0)}})},N.prototype.onHeaders=function(g){this.onHeadersCallbacks.push(g)},N.prototype.onMessage=function(g){this.onMessageCallbacks.push(g)},N.prototype.onEnd=function(g){this.onEndCallbacks.push(g)},N.prototype.start=function(g){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var _=new c.Metadata(g||{});_.set("content-type","application/grpc-web+proto"),_.set("x-grpc-web","1"),this.transport.start(_)},N.prototype.send=function(g){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var _=M.frameRequest(g);this.transport.sendMessage(_)},N.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},N.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&v.debug("request.abort aborting request"),this.transport.cancel()},N}();function b(N){var g=N.get("grpc-status")||[];if(g.length>0)try{var _=g[0];return parseInt(_,10)}catch{return null}return null}},346:function(o,D){Object.defineProperty(D,"__esModule",{value:!0}),D.debug=void 0,D.debug=function(){for(var E=[],c=0;c<arguments.length;c++)E[c]=arguments[c];console.debug?console.debug.apply(null,E):console.log.apply(null,E)}},607:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.grpc=void 0;var c,p=E(418),m=E(57),v=E(229),I=E(540),M=E(210),k=E(859),b=E(8),N=E(938),g=E(35),_=E(934);(c=D.grpc||(D.grpc={})).setDefaultTransport=m.setDefaultTransportFactory,c.CrossBrowserHttpTransport=k.CrossBrowserHttpTransport,c.FetchReadableStreamTransport=v.FetchReadableStreamTransport,c.XhrTransport=M.XhrTransport,c.WebsocketTransport=I.WebsocketTransport,c.Code=b.Code,c.Metadata=p.BrowserHeaders,c.client=function(y,S){return _.client(y,S)},c.invoke=N.invoke,c.unary=g.unary},938:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.invoke=void 0;var c=E(934);D.invoke=function(p,m){if(p.requestStream)throw new Error(".invoke cannot be used with client-streaming methods. Use .client instead.");var v=c.client(p,{host:m.host,transport:m.transport,debug:m.debug});return m.onHeaders&&v.onHeaders(m.onHeaders),m.onMessage&&v.onMessage(m.onMessage),m.onEnd&&v.onEnd(m.onEnd),v.start(m.metadata),v.send(m.request),v.finishSend(),{close:function(){v.close()}}}},65:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.Metadata=void 0;var c=E(418);Object.defineProperty(D,"Metadata",{enumerable:!0,get:function(){return c.BrowserHeaders}})},57:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.makeDefaultTransport=D.setDefaultTransportFactory=void 0;var c=E(859),p=function(m){return c.CrossBrowserHttpTransport({withCredentials:!1})(m)};D.setDefaultTransportFactory=function(m){p=m},D.makeDefaultTransport=function(m){return p(m)}},229:function(o,D,E){var c=this&&this.__assign||function(){return(c=Object.assign||function(I){for(var M,k=1,b=arguments.length;k<b;k++)for(var N in M=arguments[k])Object.prototype.hasOwnProperty.call(M,N)&&(I[N]=M[N]);return I}).apply(this,arguments)};Object.defineProperty(D,"__esModule",{value:!0}),D.detectFetchSupport=D.FetchReadableStreamTransport=void 0;var p=E(65),m=E(346);D.FetchReadableStreamTransport=function(I){return function(M){return function(k,b){return k.debug&&m.debug("fetchRequest",k),new v(k,b)}(M,I)}};var v=function(){function I(M,k){this.cancelled=!1,this.controller=self.AbortController&&new AbortController,this.options=M,this.init=k}return I.prototype.pump=function(M,k){var b=this;if(this.reader=M,this.cancelled)return this.options.debug&&m.debug("Fetch.pump.cancel at first pump"),void this.reader.cancel().catch(function(N){b.options.debug&&m.debug("Fetch.pump.reader.cancel exception",N)});this.reader.read().then(function(N){if(N.done)return b.options.onEnd(),k;b.options.onChunk(N.value),b.pump(b.reader,k)}).catch(function(N){b.cancelled?b.options.debug&&m.debug("Fetch.catch - request cancelled"):(b.cancelled=!0,b.options.debug&&m.debug("Fetch.catch",N.message),b.options.onEnd(N))})},I.prototype.send=function(M){var k=this;fetch(this.options.url,c(c({},this.init),{headers:this.metadata.toHeaders(),method:"POST",body:M,signal:this.controller&&this.controller.signal})).then(function(b){if(k.options.debug&&m.debug("Fetch.response",b),k.options.onHeaders(new p.Metadata(b.headers),b.status),!b.body)return b;k.pump(b.body.getReader(),b)}).catch(function(b){k.cancelled?k.options.debug&&m.debug("Fetch.catch - request cancelled"):(k.cancelled=!0,k.options.debug&&m.debug("Fetch.catch",b.message),k.options.onEnd(b))})},I.prototype.sendMessage=function(M){this.send(M)},I.prototype.finishSend=function(){},I.prototype.start=function(M){this.metadata=M},I.prototype.cancel=function(){var M=this;this.cancelled?this.options.debug&&m.debug("Fetch.cancel already cancelled"):(this.cancelled=!0,this.controller?(this.options.debug&&m.debug("Fetch.cancel.controller.abort"),this.controller.abort()):this.options.debug&&m.debug("Fetch.cancel.missing abort controller"),this.reader?(this.options.debug&&m.debug("Fetch.cancel.reader.cancel"),this.reader.cancel().catch(function(k){M.options.debug&&m.debug("Fetch.cancel.reader.cancel exception",k)})):this.options.debug&&m.debug("Fetch.cancel before reader"))},I}();D.detectFetchSupport=function(){return typeof Response<"u"&&Response.prototype.hasOwnProperty("body")&&typeof Headers=="function"}},859:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.CrossBrowserHttpTransport=void 0;var c=E(229),p=E(210);D.CrossBrowserHttpTransport=function(m){if(c.detectFetchSupport()){var v={credentials:m.withCredentials?"include":"same-origin"};return c.FetchReadableStreamTransport(v)}return p.XhrTransport({withCredentials:m.withCredentials})}},210:function(o,D,E){var c,p=this&&this.__extends||(c=function(g,_){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,S){y.__proto__=S}||function(y,S){for(var O in S)Object.prototype.hasOwnProperty.call(S,O)&&(y[O]=S[O])})(g,_)},function(g,_){function y(){this.constructor=g}c(g,_),g.prototype=_===null?Object.create(_):(y.prototype=_.prototype,new y)});Object.defineProperty(D,"__esModule",{value:!0}),D.stringToArrayBuffer=D.MozChunkedArrayBufferXHR=D.XHR=D.XhrTransport=void 0;var m=E(65),v=E(346),I=E(849);D.XhrTransport=function(g){return function(_){if(I.detectMozXHRSupport())return new k(_,g);if(I.detectXHROverrideMimeTypeSupport())return new M(_,g);throw new Error("This environment's XHR implementation cannot support binary transfer.")}};var M=function(){function g(_,y){this.options=_,this.init=y}return g.prototype.onProgressEvent=function(){this.options.debug&&v.debug("XHR.onProgressEvent.length: ",this.xhr.response.length);var _=this.xhr.response.substr(this.index);this.index=this.xhr.response.length;var y=N(_);this.options.onChunk(y)},g.prototype.onLoadEvent=function(){this.options.debug&&v.debug("XHR.onLoadEvent"),this.options.onEnd()},g.prototype.onStateChange=function(){this.options.debug&&v.debug("XHR.onStateChange",this.xhr.readyState),this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED&&this.options.onHeaders(new m.Metadata(this.xhr.getAllResponseHeaders()),this.xhr.status)},g.prototype.sendMessage=function(_){this.xhr.send(_)},g.prototype.responseCallback=function(_){this.options.onHeaders(new m.Metadata(function(y){var S={};for(var O in y){var uu=y[O];y.hasOwnProperty(O)&&uu!==void 0&&(S[O]=uu)}return S}(_.headers)),_.statusCode)},g.prototype.finishSend=function(){},g.prototype.start=function(_){var y=this;this.metadata=_;var S=new XMLHttpRequest;this.xhr=S,S.open("POST",this.options.url),this.configureXhr(),this.metadata.forEach(function(O,uu){S.setRequestHeader(O,uu.join(", "))}),S.withCredentials=!!this.init.withCredentials,S.addEventListener("readystatechange",this.onStateChange.bind(this)),S.addEventListener("progress",this.onProgressEvent.bind(this)),S.addEventListener("loadend",this.onLoadEvent.bind(this)),S.addEventListener("error",function(O){y.options.debug&&v.debug("XHR.error",O),y.options.onEnd(O.error)})},g.prototype.configureXhr=function(){this.xhr.responseType="text",this.xhr.overrideMimeType("text/plain; charset=x-user-defined")},g.prototype.cancel=function(){this.options.debug&&v.debug("XHR.abort"),this.xhr.abort()},g}();D.XHR=M;var k=function(g){function _(){return g!==null&&g.apply(this,arguments)||this}return p(_,g),_.prototype.configureXhr=function(){this.options.debug&&v.debug("MozXHR.configureXhr: setting responseType to 'moz-chunked-arraybuffer'"),this.xhr.responseType="moz-chunked-arraybuffer"},_.prototype.onProgressEvent=function(){var y=this.xhr.response;this.options.debug&&v.debug("MozXHR.onProgressEvent: ",new Uint8Array(y)),this.options.onChunk(new Uint8Array(y))},_}(M);function b(g,_){var y=g.charCodeAt(_);if(y>=55296&&y<=56319){var S=g.charCodeAt(_+1);S>=56320&&S<=57343&&(y=65536+(y-55296<<10)+(S-56320))}return y}function N(g){for(var _=new Uint8Array(g.length),y=0,S=0;S<g.length;S++){var O=String.prototype.codePointAt?g.codePointAt(S):b(g,S);_[y++]=255&O}return _}D.MozChunkedArrayBufferXHR=k,D.stringToArrayBuffer=N},849:function(o,D){var E;function c(){if(E!==void 0)return E;if(XMLHttpRequest){E=new XMLHttpRequest;try{E.open("GET","https://localhost")}catch{}}return E}function p(m){var v=c();if(!v)return!1;try{return v.responseType=m,v.responseType===m}catch{}return!1}Object.defineProperty(D,"__esModule",{value:!0}),D.detectXHROverrideMimeTypeSupport=D.detectMozXHRSupport=D.xhrSupportsResponseType=void 0,D.xhrSupportsResponseType=p,D.detectMozXHRSupport=function(){return typeof XMLHttpRequest<"u"&&p("moz-chunked-arraybuffer")},D.detectXHROverrideMimeTypeSupport=function(){return typeof XMLHttpRequest<"u"&&XMLHttpRequest.prototype.hasOwnProperty("overrideMimeType")}},540:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.WebsocketTransport=void 0;var c,p=E(346),m=E(617);(function(I){I[I.FINISH_SEND=1]="FINISH_SEND"})(c||(c={}));var v=new Uint8Array([1]);D.WebsocketTransport=function(){return function(I){return function(M){M.debug&&p.debug("websocketRequest",M);var k,b=function(_){if(_.substr(0,8)==="https://")return"wss://"+_.substr(8);if(_.substr(0,7)==="http://")return"ws://"+_.substr(7);throw new Error("Websocket transport constructed with non-https:// or http:// host.")}(M.url),N=[];function g(_){if(_===c.FINISH_SEND)k.send(v);else{var y=_,S=new Int8Array(y.byteLength+1);S.set(new Uint8Array([0])),S.set(y,1),k.send(S)}}return{sendMessage:function(_){k&&k.readyState!==k.CONNECTING?g(_):N.push(_)},finishSend:function(){k&&k.readyState!==k.CONNECTING?g(c.FINISH_SEND):N.push(c.FINISH_SEND)},start:function(_){(k=new WebSocket(b,["grpc-websockets"])).binaryType="arraybuffer",k.onopen=function(){var y;M.debug&&p.debug("websocketRequest.onopen"),k.send((y="",_.forEach(function(S,O){y+=S+": "+O.join(", ")+`\r
3
3
  `}),m.encodeASCII(y))),N.forEach(function(S){g(S)})},k.onclose=function(y){M.debug&&p.debug("websocketRequest.onclose",y),M.onEnd()},k.onerror=function(y){M.debug&&p.debug("websocketRequest.onerror",y)},k.onmessage=function(y){M.onChunk(new Uint8Array(y.data))}},cancel:function(){M.debug&&p.debug("websocket.abort"),k.close()}}}(I)}}},35:function(o,D,E){Object.defineProperty(D,"__esModule",{value:!0}),D.unary=void 0;var c=E(65),p=E(934);D.unary=function(m,v){if(m.responseStream)throw new Error(".unary cannot be used with server-streaming methods. Use .invoke or .client instead.");if(m.requestStream)throw new Error(".unary cannot be used with client-streaming methods. Use .client instead.");var I=null,M=null,k=p.client(m,{host:v.host,transport:v.transport,debug:v.debug});return k.onHeaders(function(b){I=b}),k.onMessage(function(b){M=b}),k.onEnd(function(b,N,g){v.onEnd({status:b,statusMessage:N,headers:I||new c.Metadata,message:M,trailers:g})}),k.start(v.metadata),k.send(v.request),k.finishSend(),{close:function(){k.close()}}}},882:function(o,D){Object.defineProperty(D,"__esModule",{value:!0}),D.frameRequest=void 0,D.frameRequest=function(E){var c=E.serializeBinary(),p=new ArrayBuffer(c.byteLength+5);return new DataView(p,1,4).setUint32(0,c.length,!1),new Uint8Array(p,5).set(c),new Uint8Array(p)}}},i={},function o(D){if(i[D])return i[D].exports;var E=i[D]={exports:{}};return n[D].call(E.exports,E,E.exports,o),E.exports}(607);var n,i})})(Dt);var le=Dt.exports,F8={exports:{}};/*! store2 - v2.14.3 - 2024-02-14
4
4
  * Copyright (c) 2024 Nathan Bubna; Licensed MIT */(function(u){(function(r,n){var i={version:"2.14.3",areas:{},apis:{},nsdelim:".",inherit:function(D,E){for(var c in D)E.hasOwnProperty(c)||Object.defineProperty(E,c,Object.getOwnPropertyDescriptor(D,c));return E},stringify:function(D,E){return D===void 0||typeof D=="function"?D+"":JSON.stringify(D,E||i.replace)},parse:function(D,E){try{return JSON.parse(D,E||i.revive)}catch{return D}},fn:function(D,E){i.storeAPI[D]=E;for(var c in i.apis)i.apis[c][D]=E},get:function(D,E){return D.getItem(E)},set:function(D,E,c){D.setItem(E,c)},remove:function(D,E){D.removeItem(E)},key:function(D,E){return D.key(E)},length:function(D){return D.length},clear:function(D){D.clear()},Store:function(D,E,c){var p=i.inherit(i.storeAPI,function(v,I,M){return arguments.length===0?p.getAll():typeof I=="function"?p.transact(v,I,M):I!==void 0?p.set(v,I,M):typeof v=="string"||typeof v=="number"?p.get(v):typeof v=="function"?p.each(v):v?p.setAll(v,I):p.clear()});p._id=D;try{var m="__store2_test";E.setItem(m,"ok"),p._area=E,E.removeItem(m)}catch{p._area=i.storage("fake")}return p._ns=c||"",i.areas[D]||(i.areas[D]=p._area),i.apis[p._ns+p._id]||(i.apis[p._ns+p._id]=p),p},storeAPI:{area:function(D,E){var c=this[D];return(!c||!c.area)&&(c=i.Store(D,E,this._ns),this[D]||(this[D]=c)),c},namespace:function(D,E,c){if(c=c||this._delim||i.nsdelim,!D)return this._ns?this._ns.substring(0,this._ns.length-c.length):"";var p=D,m=this[p];if((!m||!m.namespace)&&(m=i.Store(this._id,this._area,this._ns+p+c),m._delim=c,this[p]||(this[p]=m),!E))for(var v in i.areas)m.area(v,i.areas[v]);return m},isFake:function(D){return D?(this._real=this._area,this._area=i.storage("fake")):D===!1&&(this._area=this._real||this._area),this._area.name==="fake"},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(D){return this._area.has?this._area.has(this._in(D)):this._in(D)in this._area},size:function(){return this.keys().length},each:function(D,E){for(var c=0,p=i.length(this._area);c<p;c++){var m=this._out(i.key(this._area,c));if(m!==void 0&&D.call(this,m,this.get(m),E)===!1)break;p>i.length(this._area)&&(p--,c--)}return E||this},keys:function(D){return this.each(function(E,c,p){p.push(E)},D||[])},get:function(D,E){var c=i.get(this._area,this._in(D)),p;return typeof E=="function"&&(p=E,E=null),c!==null?i.parse(c,p):E??c},getAll:function(D){return this.each(function(E,c,p){p[E]=c},D||{})},transact:function(D,E,c){var p=this.get(D,c),m=E(p);return this.set(D,m===void 0?p:m),this},set:function(D,E,c){var p=this.get(D),m;return p!=null&&c===!1?E:(typeof c=="function"&&(m=c,c=void 0),i.set(this._area,this._in(D),i.stringify(E,m),c)||p)},setAll:function(D,E){var c,p;for(var m in D)p=D[m],this.set(m,p,E)!==p&&(c=!0);return c},add:function(D,E,c){var p=this.get(D);if(p instanceof Array)E=p.concat(E);else if(p!==null){var m=typeof p;if(m===typeof E&&m==="object"){for(var v in E)p[v]=E[v];E=p}else E=p+E}return i.set(this._area,this._in(D),i.stringify(E,c)),E},remove:function(D,E){var c=this.get(D,E);return i.remove(this._area,this._in(D)),c},clear:function(){return this._ns?this.each(function(D){i.remove(this._area,this._in(D))},1):i.clear(this._area),this},clearAll:function(){var D=this._area;for(var E in i.areas)i.areas.hasOwnProperty(E)&&(this._area=i.areas[E],this.clear());return this._area=D,this},_in:function(D){return typeof D!="string"&&(D=i.stringify(D)),this._ns?this._ns+D:D},_out:function(D){return this._ns?D&&D.indexOf(this._ns)===0?D.substring(this._ns.length):void 0:D}},storage:function(D){return i.inherit(i.storageAPI,{items:{},name:D})},storageAPI:{length:0,has:function(D){return this.items.hasOwnProperty(D)},key:function(D){var E=0;for(var c in this.items)if(this.has(c)&&D===E++)return c},setItem:function(D,E){this.has(D)||this.length++,this.items[D]=E},removeItem:function(D){this.has(D)&&(delete this.items[D],this.length--)},getItem:function(D){return this.has(D)?this.items[D]:null},clear:function(){for(var D in this.items)this.removeItem(D)}}},o=i.Store("local",function(){try{return localStorage}catch{}}());o.local=o,o._=i,o.area("session",function(){try{return sessionStorage}catch{}}()),o.area("page",i.storage("page")),typeof n=="function"&&n.amd!==void 0?n("store2",[],function(){return o}):u.exports?u.exports=o:(r.store&&(i.conflict=r.store),r.store=o)})(x.commonjsGlobal,x.commonjsGlobal&&x.commonjsGlobal.define)})(F8);var Ae=x.commonjsGlobal&&x.commonjsGlobal.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};const l8=Ae(x.bnExports),A8=Ae(x.bufferPolyfill),h8=Ae(x.js),Y0=A8.default.Buffer;function it(u){return u=E8(u),(0,h8.default)("keccak256").update(u).digest()}function E8(u){if(!Y0.isBuffer(u))if(Array.isArray(u))u=Y0.from(u);else if(typeof u=="string")c8(u)?u=Y0.from(at(C8(u)),"hex"):u=Y0.from(u);else if(typeof u=="number")u=p8(u);else if(u==null)u=Y0.allocUnsafe(0);else if(l8.default.isBN(u))u=u.toArrayLike(Y0);else if(u.toArray)u=Y0.from(u.toArray());else throw new Error("invalid type");return u}function c8(u,r){return!(typeof u!="string"||!u.match(/^0x[0-9A-Fa-f]*$/))}function at(u){if(typeof u!="string")throw new Error(`while padding to even, value must be string, is currently ${typeof u}, while padToEven.`);return u.length%2&&(u=`0${u}`),u}function C8(u){return typeof u!="string"?u:d8(u)?u.slice(2):u}function d8(u){if(typeof u!="string")throw new Error("value must be type 'string', is currently type "+typeof u+", while checking isHexPrefixed.");return u.slice(0,2)==="0x"}function p8(u){const r=B8(u);return Y0.from(at(r.slice(2)),"hex")}function B8(u){return`0x${u.toString(16)}`}typeof window<"u"&&(window.keccak256=it);var m8=it;const v8=x.getDefaultExportFromCjs(m8);var ot={},u2={},V1={},K1={},st={},G1={};Object.defineProperty(G1,"__esModule",{value:!0});var ft=x.requireBrowser();function y8(u){return new Promise(function(r,n){ft(u,function(i,o){if(i){n(i);return}r(o)})})}G1.getRandomBytes=y8;function g8(u){return ft(u)}G1.getRandomBytesSync=g8;(function(u){var r=x.commonjsGlobal&&x.commonjsGlobal.__awaiter||function(m,v,I,M){function k(b){return b instanceof I?b:new I(function(N){N(b)})}return new(I||(I=Promise))(function(b,N){function g(S){try{y(M.next(S))}catch(O){N(O)}}function _(S){try{y(M.throw(S))}catch(O){N(O)}}function y(S){S.done?b(S.value):k(S.value).then(g,_)}y((M=M.apply(m,v||[])).next())})},n=x.commonjsGlobal&&x.commonjsGlobal.__generator||function(m,v){var I={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},M,k,b,N;return N={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function g(y){return function(S){return _([y,S])}}function _(y){if(M)throw new TypeError("Generator is already executing.");for(;I;)try{if(M=1,k&&(b=y[0]&2?k.return:y[0]?k.throw||((b=k.return)&&b.call(k),0):k.next)&&!(b=b.call(k,y[1])).done)return b;switch(k=0,b&&(y=[y[0]&2,b.value]),y[0]){case 0:case 1:b=y;break;case 4:return I.label++,{value:y[1],done:!1};case 5:I.label++,k=y[1],y=[0];continue;case 7:y=I.ops.pop(),I.trys.pop();continue;default:if(b=I.trys,!(b=b.length>0&&b[b.length-1])&&(y[0]===6||y[0]===2)){I=0;continue}if(y[0]===3&&(!b||y[1]>b[0]&&y[1]<b[3])){I.label=y[1];break}if(y[0]===6&&I.label<b[1]){I.label=b[1],b=y;break}if(b&&I.label<b[2]){I.label=b[2],I.ops.push(y);break}b[2]&&I.ops.pop(),I.trys.pop();continue}y=v.call(m,I)}catch(S){y=[6,S],k=0}finally{M=b=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}};function i(m){for(var v in m)u.hasOwnProperty(v)||(u[v]=m[v])}Object.defineProperty(u,"__esModule",{value:!0});var o=x.elliptic,D=G1,E=32;function c(){return r(this,void 0,void 0,function(){var m;return n(this,function(v){switch(v.label){case 0:return[4,D.getRandomBytes(E)];case 1:return m=v.sent(),o.privateKeyVerify(m)?[2,m]:[3,0];case 2:return[2]}})})}u.createPrivateKey=c;function p(){for(;;){var m=D.getRandomBytesSync(E);if(o.privateKeyVerify(m))return m}}u.createPrivateKeySync=p,i(x.elliptic)})(st);var K2={},he={exports:{}};he.exports;(function(u){(function(r,n){function i(h,e){if(!h)throw new Error(e||"Assertion failed")}function o(h,e){h.super_=e;var a=function(){};a.prototype=e.prototype,h.prototype=new a,h.prototype.constructor=h}function D(h,e,a){if(D.isBN(h))return h;this.negative=0,this.words=null,this.length=0,this.red=null,h!==null&&((e==="le"||e==="be")&&(a=e,e=10),this._init(h||0,e||10,a||"be"))}typeof r=="object"?r.exports=D:n.BN=D,D.BN=D,D.wordSize=26;var E;try{typeof window<"u"&&typeof window.Buffer<"u"?E=window.Buffer:E=x.bufferPolyfill.Buffer}catch{}D.isBN=function(e){return e instanceof D?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===D.wordSize&&Array.isArray(e.words)},D.max=function(e,a){return e.cmp(a)>0?e:a},D.min=function(e,a){return e.cmp(a)<0?e:a},D.prototype._init=function(e,a,s){if(typeof e=="number")return this._initNumber(e,a,s);if(typeof e=="object")return this._initArray(e,a,s);a==="hex"&&(a=16),i(a===(a|0)&&a>=2&&a<=36),e=e.toString().replace(/\s+/g,"");var f=0;e[0]==="-"&&(f++,this.negative=1),f<e.length&&(a===16?this._parseHex(e,f,s):(this._parseBase(e,a,f),s==="le"&&this._initArray(this.toArray(),a,s)))},D.prototype._initNumber=function(e,a,s){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),s==="le"&&this._initArray(this.toArray(),a,s)},D.prototype._initArray=function(e,a,s){if(i(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var A,C,B=0;if(s==="be")for(f=e.length-1,A=0;f>=0;f-=3)C=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[A]|=C<<B&67108863,this.words[A+1]=C>>>26-B&67108863,B+=24,B>=26&&(B-=26,A++);else if(s==="le")for(f=0,A=0;f<e.length;f+=3)C=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[A]|=C<<B&67108863,this.words[A+1]=C>>>26-B&67108863,B+=24,B>=26&&(B-=26,A++);return this.strip()};function c(h,e){var a=h.charCodeAt(e);return a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function p(h,e,a){var s=c(h,a);return a-1>=e&&(s|=c(h,a-1)<<4),s}D.prototype._parseHex=function(e,a,s){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var A=0,C=0,B;if(s==="be")for(f=e.length-1;f>=a;f-=2)B=p(e,a,f)<<A,this.words[C]|=B&67108863,A>=18?(A-=18,C+=1,this.words[C]|=B>>>26):A+=8;else{var F=e.length-a;for(f=F%2===0?a+1:a;f<e.length;f+=2)B=p(e,a,f)<<A,this.words[C]|=B&67108863,A>=18?(A-=18,C+=1,this.words[C]|=B>>>26):A+=8}this.strip()};function m(h,e,a,s){for(var f=0,A=Math.min(h.length,a),C=e;C<A;C++){var B=h.charCodeAt(C)-48;f*=s,B>=49?f+=B-49+10:B>=17?f+=B-17+10:f+=B}return f}D.prototype._parseBase=function(e,a,s){this.words=[0],this.length=1;for(var f=0,A=1;A<=67108863;A*=a)f++;f--,A=A/a|0;for(var C=e.length-s,B=C%f,F=Math.min(C,C-B)+s,t=0,l=s;l<F;l+=f)t=m(e,l,l+f,a),this.imuln(A),this.words[0]+t<67108864?this.words[0]+=t:this._iaddn(t);if(B!==0){var R=1;for(t=m(e,l,e.length,a),l=0;l<B;l++)R*=a;this.imuln(R),this.words[0]+t<67108864?this.words[0]+=t:this._iaddn(t)}this.strip()},D.prototype.copy=function(e){e.words=new Array(this.length);for(var a=0;a<this.length;a++)e.words[a]=this.words[a];e.length=this.length,e.negative=this.negative,e.red=this.red},D.prototype.clone=function(){var e=new D(null);return this.copy(e),e},D.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},D.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},D.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},D.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var v=["","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"],I=[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],M=[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];D.prototype.toString=function(e,a){e=e||10,a=a|0||1;var s;if(e===16||e==="hex"){s="";for(var f=0,A=0,C=0;C<this.length;C++){var B=this.words[C],F=((B<<f|A)&16777215).toString(16);A=B>>>24-f&16777215,A!==0||C!==this.length-1?s=v[6-F.length]+F+s:s=F+s,f+=2,f>=26&&(f-=26,C--)}for(A!==0&&(s=A.toString(16)+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}if(e===(e|0)&&e>=2&&e<=36){var t=I[e],l=M[e];s="";var R=this.clone();for(R.negative=0;!R.isZero();){var L=R.modn(l).toString(e);R=R.idivn(l),R.isZero()?s=L+s:s=v[t-L.length]+L+s}for(this.isZero()&&(s="0"+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}i(!1,"Base should be between 2 and 36")},D.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},D.prototype.toJSON=function(){return this.toString(16)},D.prototype.toBuffer=function(e,a){return i(typeof E<"u"),this.toArrayLike(E,e,a)},D.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},D.prototype.toArrayLike=function(e,a,s){var f=this.byteLength(),A=s||Math.max(1,f);i(f<=A,"byte array longer than desired length"),i(A>0,"Requested array length <= 0"),this.strip();var C=a==="le",B=new e(A),F,t,l=this.clone();if(C){for(t=0;!l.isZero();t++)F=l.andln(255),l.iushrn(8),B[t]=F;for(;t<A;t++)B[t]=0}else{for(t=0;t<A-f;t++)B[t]=0;for(t=0;!l.isZero();t++)F=l.andln(255),l.iushrn(8),B[A-t-1]=F}return B},Math.clz32?D.prototype._countBits=function(e){return 32-Math.clz32(e)}:D.prototype._countBits=function(e){var a=e,s=0;return a>=4096&&(s+=13,a>>>=13),a>=64&&(s+=7,a>>>=7),a>=8&&(s+=4,a>>>=4),a>=2&&(s+=2,a>>>=2),s+a},D.prototype._zeroBits=function(e){if(e===0)return 26;var a=e,s=0;return a&8191||(s+=13,a>>>=13),a&127||(s+=7,a>>>=7),a&15||(s+=4,a>>>=4),a&3||(s+=2,a>>>=2),a&1||s++,s},D.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return(this.length-1)*26+a};function k(h){for(var e=new Array(h.bitLength()),a=0;a<e.length;a++){var s=a/26|0,f=a%26;e[a]=(h.words[s]&1<<f)>>>f}return e}D.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;a<this.length;a++){var s=this._zeroBits(this.words[a]);if(e+=s,s!==26)break}return e},D.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},D.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},D.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},D.prototype.isNeg=function(){return this.negative!==0},D.prototype.neg=function(){return this.clone().ineg()},D.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},D.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var a=0;a<e.length;a++)this.words[a]=this.words[a]|e.words[a];return this.strip()},D.prototype.ior=function(e){return i((this.negative|e.negative)===0),this.iuor(e)},D.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},D.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},D.prototype.iuand=function(e){var a;this.length>e.length?a=e:a=this;for(var s=0;s<a.length;s++)this.words[s]=this.words[s]&e.words[s];return this.length=a.length,this.strip()},D.prototype.iand=function(e){return i((this.negative|e.negative)===0),this.iuand(e)},D.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},D.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},D.prototype.iuxor=function(e){var a,s;this.length>e.length?(a=this,s=e):(a=e,s=this);for(var f=0;f<s.length;f++)this.words[f]=a.words[f]^s.words[f];if(this!==a)for(;f<a.length;f++)this.words[f]=a.words[f];return this.length=a.length,this.strip()},D.prototype.ixor=function(e){return i((this.negative|e.negative)===0),this.iuxor(e)},D.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},D.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},D.prototype.inotn=function(e){i(typeof e=="number"&&e>=0);var a=Math.ceil(e/26)|0,s=e%26;this._expand(a),s>0&&a--;for(var f=0;f<a;f++)this.words[f]=~this.words[f]&67108863;return s>0&&(this.words[f]=~this.words[f]&67108863>>26-s),this.strip()},D.prototype.notn=function(e){return this.clone().inotn(e)},D.prototype.setn=function(e,a){i(typeof e=="number"&&e>=0);var s=e/26|0,f=e%26;return this._expand(s+1),a?this.words[s]=this.words[s]|1<<f:this.words[s]=this.words[s]&~(1<<f),this.strip()},D.prototype.iadd=function(e){var a;if(this.negative!==0&&e.negative===0)return this.negative=0,a=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,a=this.isub(e),e.negative=1,a._normSign();var s,f;this.length>e.length?(s=this,f=e):(s=e,f=this);for(var A=0,C=0;C<f.length;C++)a=(s.words[C]|0)+(f.words[C]|0)+A,this.words[C]=a&67108863,A=a>>>26;for(;A!==0&&C<s.length;C++)a=(s.words[C]|0)+A,this.words[C]=a&67108863,A=a>>>26;if(this.length=s.length,A!==0)this.words[this.length]=A,this.length++;else if(s!==this)for(;C<s.length;C++)this.words[C]=s.words[C];return this},D.prototype.add=function(e){var a;return e.negative!==0&&this.negative===0?(e.negative=0,a=this.sub(e),e.negative^=1,a):e.negative===0&&this.negative!==0?(this.negative=0,a=e.sub(this),this.negative=1,a):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},D.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var s=this.cmp(e);if(s===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,A;s>0?(f=this,A=e):(f=e,A=this);for(var C=0,B=0;B<A.length;B++)a=(f.words[B]|0)-(A.words[B]|0)+C,C=a>>26,this.words[B]=a&67108863;for(;C!==0&&B<f.length;B++)a=(f.words[B]|0)+C,C=a>>26,this.words[B]=a&67108863;if(C===0&&B<f.length&&f!==this)for(;B<f.length;B++)this.words[B]=f.words[B];return this.length=Math.max(this.length,B),f!==this&&(this.negative=1),this.strip()},D.prototype.sub=function(e){return this.clone().isub(e)};function b(h,e,a){a.negative=e.negative^h.negative;var s=h.length+e.length|0;a.length=s,s=s-1|0;var f=h.words[0]|0,A=e.words[0]|0,C=f*A,B=C&67108863,F=C/67108864|0;a.words[0]=B;for(var t=1;t<s;t++){for(var l=F>>>26,R=F&67108863,L=Math.min(t,e.length-1),H=Math.max(0,t-h.length+1);H<=L;H++){var d=t-H|0;f=h.words[d]|0,A=e.words[H]|0,C=f*A+R,l+=C/67108864|0,R=C&67108863}a.words[t]=R|0,F=l|0}return F!==0?a.words[t]=F|0:a.length--,a.strip()}var N=function(e,a,s){var f=e.words,A=a.words,C=s.words,B=0,F,t,l,R=f[0]|0,L=R&8191,H=R>>>13,d=f[1]|0,$=d&8191,j=d>>>13,iu=f[2]|0,X=iu&8191,ru=iu>>>13,Pu=f[3]|0,eu=Pu&8191,W=Pu>>>13,Lu=f[4]|0,hu=Lu&8191,Eu=Lu>>>13,s0=f[5]|0,cu=s0&8191,Cu=s0>>>13,u0=f[6]|0,K=u0&8191,pu=u0>>>13,w=f[7]|0,T=w&8191,P=w>>>13,Y=f[8]|0,G=Y&8191,V=Y>>>13,tu=f[9]|0,z=tu&8191,Q=tu>>>13,lu=A[0]|0,su=lu&8191,fu=lu>>>13,Hu=A[1]|0,ou=Hu&8191,Fu=Hu>>>13,r0=A[2]|0,Au=r0&8191,du=r0>>>13,b0=A[3]|0,vu=b0&8191,yu=b0>>>13,_0=A[4]|0,gu=_0&8191,wu=_0>>>13,M0=A[5]|0,xu=M0&8191,bu=M0>>>13,I0=A[6]|0,_u=I0&8191,Mu=I0>>>13,S0=A[7]|0,Iu=S0&8191,Su=S0>>>13,U0=A[8]|0,Uu=U0&8191,Tu=U0>>>13,T0=A[9]|0,Ou=T0&8191,ku=T0>>>13;s.negative=e.negative^a.negative,s.length=19,F=Math.imul(L,su),t=Math.imul(L,fu),t=t+Math.imul(H,su)|0,l=Math.imul(H,fu);var f0=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(f0>>>26)|0,f0&=67108863,F=Math.imul($,su),t=Math.imul($,fu),t=t+Math.imul(j,su)|0,l=Math.imul(j,fu),F=F+Math.imul(L,ou)|0,t=t+Math.imul(L,Fu)|0,t=t+Math.imul(H,ou)|0,l=l+Math.imul(H,Fu)|0;var F0=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(F0>>>26)|0,F0&=67108863,F=Math.imul(X,su),t=Math.imul(X,fu),t=t+Math.imul(ru,su)|0,l=Math.imul(ru,fu),F=F+Math.imul($,ou)|0,t=t+Math.imul($,Fu)|0,t=t+Math.imul(j,ou)|0,l=l+Math.imul(j,Fu)|0,F=F+Math.imul(L,Au)|0,t=t+Math.imul(L,du)|0,t=t+Math.imul(H,Au)|0,l=l+Math.imul(H,du)|0;var l0=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(l0>>>26)|0,l0&=67108863,F=Math.imul(eu,su),t=Math.imul(eu,fu),t=t+Math.imul(W,su)|0,l=Math.imul(W,fu),F=F+Math.imul(X,ou)|0,t=t+Math.imul(X,Fu)|0,t=t+Math.imul(ru,ou)|0,l=l+Math.imul(ru,Fu)|0,F=F+Math.imul($,Au)|0,t=t+Math.imul($,du)|0,t=t+Math.imul(j,Au)|0,l=l+Math.imul(j,du)|0,F=F+Math.imul(L,vu)|0,t=t+Math.imul(L,yu)|0,t=t+Math.imul(H,vu)|0,l=l+Math.imul(H,yu)|0;var A0=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(A0>>>26)|0,A0&=67108863,F=Math.imul(hu,su),t=Math.imul(hu,fu),t=t+Math.imul(Eu,su)|0,l=Math.imul(Eu,fu),F=F+Math.imul(eu,ou)|0,t=t+Math.imul(eu,Fu)|0,t=t+Math.imul(W,ou)|0,l=l+Math.imul(W,Fu)|0,F=F+Math.imul(X,Au)|0,t=t+Math.imul(X,du)|0,t=t+Math.imul(ru,Au)|0,l=l+Math.imul(ru,du)|0,F=F+Math.imul($,vu)|0,t=t+Math.imul($,yu)|0,t=t+Math.imul(j,vu)|0,l=l+Math.imul(j,yu)|0,F=F+Math.imul(L,gu)|0,t=t+Math.imul(L,wu)|0,t=t+Math.imul(H,gu)|0,l=l+Math.imul(H,wu)|0;var h0=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(h0>>>26)|0,h0&=67108863,F=Math.imul(cu,su),t=Math.imul(cu,fu),t=t+Math.imul(Cu,su)|0,l=Math.imul(Cu,fu),F=F+Math.imul(hu,ou)|0,t=t+Math.imul(hu,Fu)|0,t=t+Math.imul(Eu,ou)|0,l=l+Math.imul(Eu,Fu)|0,F=F+Math.imul(eu,Au)|0,t=t+Math.imul(eu,du)|0,t=t+Math.imul(W,Au)|0,l=l+Math.imul(W,du)|0,F=F+Math.imul(X,vu)|0,t=t+Math.imul(X,yu)|0,t=t+Math.imul(ru,vu)|0,l=l+Math.imul(ru,yu)|0,F=F+Math.imul($,gu)|0,t=t+Math.imul($,wu)|0,t=t+Math.imul(j,gu)|0,l=l+Math.imul(j,wu)|0,F=F+Math.imul(L,xu)|0,t=t+Math.imul(L,bu)|0,t=t+Math.imul(H,xu)|0,l=l+Math.imul(H,bu)|0;var E0=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(E0>>>26)|0,E0&=67108863,F=Math.imul(K,su),t=Math.imul(K,fu),t=t+Math.imul(pu,su)|0,l=Math.imul(pu,fu),F=F+Math.imul(cu,ou)|0,t=t+Math.imul(cu,Fu)|0,t=t+Math.imul(Cu,ou)|0,l=l+Math.imul(Cu,Fu)|0,F=F+Math.imul(hu,Au)|0,t=t+Math.imul(hu,du)|0,t=t+Math.imul(Eu,Au)|0,l=l+Math.imul(Eu,du)|0,F=F+Math.imul(eu,vu)|0,t=t+Math.imul(eu,yu)|0,t=t+Math.imul(W,vu)|0,l=l+Math.imul(W,yu)|0,F=F+Math.imul(X,gu)|0,t=t+Math.imul(X,wu)|0,t=t+Math.imul(ru,gu)|0,l=l+Math.imul(ru,wu)|0,F=F+Math.imul($,xu)|0,t=t+Math.imul($,bu)|0,t=t+Math.imul(j,xu)|0,l=l+Math.imul(j,bu)|0,F=F+Math.imul(L,_u)|0,t=t+Math.imul(L,Mu)|0,t=t+Math.imul(H,_u)|0,l=l+Math.imul(H,Mu)|0;var c0=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(c0>>>26)|0,c0&=67108863,F=Math.imul(T,su),t=Math.imul(T,fu),t=t+Math.imul(P,su)|0,l=Math.imul(P,fu),F=F+Math.imul(K,ou)|0,t=t+Math.imul(K,Fu)|0,t=t+Math.imul(pu,ou)|0,l=l+Math.imul(pu,Fu)|0,F=F+Math.imul(cu,Au)|0,t=t+Math.imul(cu,du)|0,t=t+Math.imul(Cu,Au)|0,l=l+Math.imul(Cu,du)|0,F=F+Math.imul(hu,vu)|0,t=t+Math.imul(hu,yu)|0,t=t+Math.imul(Eu,vu)|0,l=l+Math.imul(Eu,yu)|0,F=F+Math.imul(eu,gu)|0,t=t+Math.imul(eu,wu)|0,t=t+Math.imul(W,gu)|0,l=l+Math.imul(W,wu)|0,F=F+Math.imul(X,xu)|0,t=t+Math.imul(X,bu)|0,t=t+Math.imul(ru,xu)|0,l=l+Math.imul(ru,bu)|0,F=F+Math.imul($,_u)|0,t=t+Math.imul($,Mu)|0,t=t+Math.imul(j,_u)|0,l=l+Math.imul(j,Mu)|0,F=F+Math.imul(L,Iu)|0,t=t+Math.imul(L,Su)|0,t=t+Math.imul(H,Iu)|0,l=l+Math.imul(H,Su)|0;var a2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(a2>>>26)|0,a2&=67108863,F=Math.imul(G,su),t=Math.imul(G,fu),t=t+Math.imul(V,su)|0,l=Math.imul(V,fu),F=F+Math.imul(T,ou)|0,t=t+Math.imul(T,Fu)|0,t=t+Math.imul(P,ou)|0,l=l+Math.imul(P,Fu)|0,F=F+Math.imul(K,Au)|0,t=t+Math.imul(K,du)|0,t=t+Math.imul(pu,Au)|0,l=l+Math.imul(pu,du)|0,F=F+Math.imul(cu,vu)|0,t=t+Math.imul(cu,yu)|0,t=t+Math.imul(Cu,vu)|0,l=l+Math.imul(Cu,yu)|0,F=F+Math.imul(hu,gu)|0,t=t+Math.imul(hu,wu)|0,t=t+Math.imul(Eu,gu)|0,l=l+Math.imul(Eu,wu)|0,F=F+Math.imul(eu,xu)|0,t=t+Math.imul(eu,bu)|0,t=t+Math.imul(W,xu)|0,l=l+Math.imul(W,bu)|0,F=F+Math.imul(X,_u)|0,t=t+Math.imul(X,Mu)|0,t=t+Math.imul(ru,_u)|0,l=l+Math.imul(ru,Mu)|0,F=F+Math.imul($,Iu)|0,t=t+Math.imul($,Su)|0,t=t+Math.imul(j,Iu)|0,l=l+Math.imul(j,Su)|0,F=F+Math.imul(L,Uu)|0,t=t+Math.imul(L,Tu)|0,t=t+Math.imul(H,Uu)|0,l=l+Math.imul(H,Tu)|0;var o2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(o2>>>26)|0,o2&=67108863,F=Math.imul(z,su),t=Math.imul(z,fu),t=t+Math.imul(Q,su)|0,l=Math.imul(Q,fu),F=F+Math.imul(G,ou)|0,t=t+Math.imul(G,Fu)|0,t=t+Math.imul(V,ou)|0,l=l+Math.imul(V,Fu)|0,F=F+Math.imul(T,Au)|0,t=t+Math.imul(T,du)|0,t=t+Math.imul(P,Au)|0,l=l+Math.imul(P,du)|0,F=F+Math.imul(K,vu)|0,t=t+Math.imul(K,yu)|0,t=t+Math.imul(pu,vu)|0,l=l+Math.imul(pu,yu)|0,F=F+Math.imul(cu,gu)|0,t=t+Math.imul(cu,wu)|0,t=t+Math.imul(Cu,gu)|0,l=l+Math.imul(Cu,wu)|0,F=F+Math.imul(hu,xu)|0,t=t+Math.imul(hu,bu)|0,t=t+Math.imul(Eu,xu)|0,l=l+Math.imul(Eu,bu)|0,F=F+Math.imul(eu,_u)|0,t=t+Math.imul(eu,Mu)|0,t=t+Math.imul(W,_u)|0,l=l+Math.imul(W,Mu)|0,F=F+Math.imul(X,Iu)|0,t=t+Math.imul(X,Su)|0,t=t+Math.imul(ru,Iu)|0,l=l+Math.imul(ru,Su)|0,F=F+Math.imul($,Uu)|0,t=t+Math.imul($,Tu)|0,t=t+Math.imul(j,Uu)|0,l=l+Math.imul(j,Tu)|0,F=F+Math.imul(L,Ou)|0,t=t+Math.imul(L,ku)|0,t=t+Math.imul(H,Ou)|0,l=l+Math.imul(H,ku)|0;var s2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(s2>>>26)|0,s2&=67108863,F=Math.imul(z,ou),t=Math.imul(z,Fu),t=t+Math.imul(Q,ou)|0,l=Math.imul(Q,Fu),F=F+Math.imul(G,Au)|0,t=t+Math.imul(G,du)|0,t=t+Math.imul(V,Au)|0,l=l+Math.imul(V,du)|0,F=F+Math.imul(T,vu)|0,t=t+Math.imul(T,yu)|0,t=t+Math.imul(P,vu)|0,l=l+Math.imul(P,yu)|0,F=F+Math.imul(K,gu)|0,t=t+Math.imul(K,wu)|0,t=t+Math.imul(pu,gu)|0,l=l+Math.imul(pu,wu)|0,F=F+Math.imul(cu,xu)|0,t=t+Math.imul(cu,bu)|0,t=t+Math.imul(Cu,xu)|0,l=l+Math.imul(Cu,bu)|0,F=F+Math.imul(hu,_u)|0,t=t+Math.imul(hu,Mu)|0,t=t+Math.imul(Eu,_u)|0,l=l+Math.imul(Eu,Mu)|0,F=F+Math.imul(eu,Iu)|0,t=t+Math.imul(eu,Su)|0,t=t+Math.imul(W,Iu)|0,l=l+Math.imul(W,Su)|0,F=F+Math.imul(X,Uu)|0,t=t+Math.imul(X,Tu)|0,t=t+Math.imul(ru,Uu)|0,l=l+Math.imul(ru,Tu)|0,F=F+Math.imul($,Ou)|0,t=t+Math.imul($,ku)|0,t=t+Math.imul(j,Ou)|0,l=l+Math.imul(j,ku)|0;var f2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(f2>>>26)|0,f2&=67108863,F=Math.imul(z,Au),t=Math.imul(z,du),t=t+Math.imul(Q,Au)|0,l=Math.imul(Q,du),F=F+Math.imul(G,vu)|0,t=t+Math.imul(G,yu)|0,t=t+Math.imul(V,vu)|0,l=l+Math.imul(V,yu)|0,F=F+Math.imul(T,gu)|0,t=t+Math.imul(T,wu)|0,t=t+Math.imul(P,gu)|0,l=l+Math.imul(P,wu)|0,F=F+Math.imul(K,xu)|0,t=t+Math.imul(K,bu)|0,t=t+Math.imul(pu,xu)|0,l=l+Math.imul(pu,bu)|0,F=F+Math.imul(cu,_u)|0,t=t+Math.imul(cu,Mu)|0,t=t+Math.imul(Cu,_u)|0,l=l+Math.imul(Cu,Mu)|0,F=F+Math.imul(hu,Iu)|0,t=t+Math.imul(hu,Su)|0,t=t+Math.imul(Eu,Iu)|0,l=l+Math.imul(Eu,Su)|0,F=F+Math.imul(eu,Uu)|0,t=t+Math.imul(eu,Tu)|0,t=t+Math.imul(W,Uu)|0,l=l+Math.imul(W,Tu)|0,F=F+Math.imul(X,Ou)|0,t=t+Math.imul(X,ku)|0,t=t+Math.imul(ru,Ou)|0,l=l+Math.imul(ru,ku)|0;var F2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(F2>>>26)|0,F2&=67108863,F=Math.imul(z,vu),t=Math.imul(z,yu),t=t+Math.imul(Q,vu)|0,l=Math.imul(Q,yu),F=F+Math.imul(G,gu)|0,t=t+Math.imul(G,wu)|0,t=t+Math.imul(V,gu)|0,l=l+Math.imul(V,wu)|0,F=F+Math.imul(T,xu)|0,t=t+Math.imul(T,bu)|0,t=t+Math.imul(P,xu)|0,l=l+Math.imul(P,bu)|0,F=F+Math.imul(K,_u)|0,t=t+Math.imul(K,Mu)|0,t=t+Math.imul(pu,_u)|0,l=l+Math.imul(pu,Mu)|0,F=F+Math.imul(cu,Iu)|0,t=t+Math.imul(cu,Su)|0,t=t+Math.imul(Cu,Iu)|0,l=l+Math.imul(Cu,Su)|0,F=F+Math.imul(hu,Uu)|0,t=t+Math.imul(hu,Tu)|0,t=t+Math.imul(Eu,Uu)|0,l=l+Math.imul(Eu,Tu)|0,F=F+Math.imul(eu,Ou)|0,t=t+Math.imul(eu,ku)|0,t=t+Math.imul(W,Ou)|0,l=l+Math.imul(W,ku)|0;var l2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(l2>>>26)|0,l2&=67108863,F=Math.imul(z,gu),t=Math.imul(z,wu),t=t+Math.imul(Q,gu)|0,l=Math.imul(Q,wu),F=F+Math.imul(G,xu)|0,t=t+Math.imul(G,bu)|0,t=t+Math.imul(V,xu)|0,l=l+Math.imul(V,bu)|0,F=F+Math.imul(T,_u)|0,t=t+Math.imul(T,Mu)|0,t=t+Math.imul(P,_u)|0,l=l+Math.imul(P,Mu)|0,F=F+Math.imul(K,Iu)|0,t=t+Math.imul(K,Su)|0,t=t+Math.imul(pu,Iu)|0,l=l+Math.imul(pu,Su)|0,F=F+Math.imul(cu,Uu)|0,t=t+Math.imul(cu,Tu)|0,t=t+Math.imul(Cu,Uu)|0,l=l+Math.imul(Cu,Tu)|0,F=F+Math.imul(hu,Ou)|0,t=t+Math.imul(hu,ku)|0,t=t+Math.imul(Eu,Ou)|0,l=l+Math.imul(Eu,ku)|0;var A2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(A2>>>26)|0,A2&=67108863,F=Math.imul(z,xu),t=Math.imul(z,bu),t=t+Math.imul(Q,xu)|0,l=Math.imul(Q,bu),F=F+Math.imul(G,_u)|0,t=t+Math.imul(G,Mu)|0,t=t+Math.imul(V,_u)|0,l=l+Math.imul(V,Mu)|0,F=F+Math.imul(T,Iu)|0,t=t+Math.imul(T,Su)|0,t=t+Math.imul(P,Iu)|0,l=l+Math.imul(P,Su)|0,F=F+Math.imul(K,Uu)|0,t=t+Math.imul(K,Tu)|0,t=t+Math.imul(pu,Uu)|0,l=l+Math.imul(pu,Tu)|0,F=F+Math.imul(cu,Ou)|0,t=t+Math.imul(cu,ku)|0,t=t+Math.imul(Cu,Ou)|0,l=l+Math.imul(Cu,ku)|0;var h2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(h2>>>26)|0,h2&=67108863,F=Math.imul(z,_u),t=Math.imul(z,Mu),t=t+Math.imul(Q,_u)|0,l=Math.imul(Q,Mu),F=F+Math.imul(G,Iu)|0,t=t+Math.imul(G,Su)|0,t=t+Math.imul(V,Iu)|0,l=l+Math.imul(V,Su)|0,F=F+Math.imul(T,Uu)|0,t=t+Math.imul(T,Tu)|0,t=t+Math.imul(P,Uu)|0,l=l+Math.imul(P,Tu)|0,F=F+Math.imul(K,Ou)|0,t=t+Math.imul(K,ku)|0,t=t+Math.imul(pu,Ou)|0,l=l+Math.imul(pu,ku)|0;var E2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(E2>>>26)|0,E2&=67108863,F=Math.imul(z,Iu),t=Math.imul(z,Su),t=t+Math.imul(Q,Iu)|0,l=Math.imul(Q,Su),F=F+Math.imul(G,Uu)|0,t=t+Math.imul(G,Tu)|0,t=t+Math.imul(V,Uu)|0,l=l+Math.imul(V,Tu)|0,F=F+Math.imul(T,Ou)|0,t=t+Math.imul(T,ku)|0,t=t+Math.imul(P,Ou)|0,l=l+Math.imul(P,ku)|0;var c2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(c2>>>26)|0,c2&=67108863,F=Math.imul(z,Uu),t=Math.imul(z,Tu),t=t+Math.imul(Q,Uu)|0,l=Math.imul(Q,Tu),F=F+Math.imul(G,Ou)|0,t=t+Math.imul(G,ku)|0,t=t+Math.imul(V,Ou)|0,l=l+Math.imul(V,ku)|0;var C2=(B+F|0)+((t&8191)<<13)|0;B=(l+(t>>>13)|0)+(C2>>>26)|0,C2&=67108863,F=Math.imul(z,Ou),t=Math.imul(z,ku),t=t+Math.imul(Q,Ou)|0,l=Math.imul(Q,ku);var d2=(B+F|0)+((t&8191)<<13)|0;return B=(l+(t>>>13)|0)+(d2>>>26)|0,d2&=67108863,C[0]=f0,C[1]=F0,C[2]=l0,C[3]=A0,C[4]=h0,C[5]=E0,C[6]=c0,C[7]=a2,C[8]=o2,C[9]=s2,C[10]=f2,C[11]=F2,C[12]=l2,C[13]=A2,C[14]=h2,C[15]=E2,C[16]=c2,C[17]=C2,C[18]=d2,B!==0&&(C[19]=B,s.length++),s};Math.imul||(N=b);function g(h,e,a){a.negative=e.negative^h.negative,a.length=h.length+e.length;for(var s=0,f=0,A=0;A<a.length-1;A++){var C=f;f=0;for(var B=s&67108863,F=Math.min(A,e.length-1),t=Math.max(0,A-h.length+1);t<=F;t++){var l=A-t,R=h.words[l]|0,L=e.words[t]|0,H=R*L,d=H&67108863;C=C+(H/67108864|0)|0,d=d+B|0,B=d&67108863,C=C+(d>>>26)|0,f+=C>>>26,C&=67108863}a.words[A]=B,s=C,C=f}return s!==0?a.words[A]=s:a.length--,a.strip()}function _(h,e,a){var s=new y;return s.mulp(h,e,a)}D.prototype.mulTo=function(e,a){var s,f=this.length+e.length;return this.length===10&&e.length===10?s=N(this,e,a):f<63?s=b(this,e,a):f<1024?s=g(this,e,a):s=_(this,e,a),s};function y(h,e){this.x=h,this.y=e}y.prototype.makeRBT=function(e){for(var a=new Array(e),s=D.prototype._countBits(e)-1,f=0;f<e;f++)a[f]=this.revBin(f,s,e);return a},y.prototype.revBin=function(e,a,s){if(e===0||e===s-1)return e;for(var f=0,A=0;A<a;A++)f|=(e&1)<<a-A-1,e>>=1;return f},y.prototype.permute=function(e,a,s,f,A,C){for(var B=0;B<C;B++)f[B]=a[e[B]],A[B]=s[e[B]]},y.prototype.transform=function(e,a,s,f,A,C){this.permute(C,e,a,s,f,A);for(var B=1;B<A;B<<=1)for(var F=B<<1,t=Math.cos(2*Math.PI/F),l=Math.sin(2*Math.PI/F),R=0;R<A;R+=F)for(var L=t,H=l,d=0;d<B;d++){var $=s[R+d],j=f[R+d],iu=s[R+d+B],X=f[R+d+B],ru=L*iu-H*X;X=L*X+H*iu,iu=ru,s[R+d]=$+iu,f[R+d]=j+X,s[R+d+B]=$-iu,f[R+d+B]=j-X,d!==F&&(ru=t*L-l*H,H=t*H+l*L,L=ru)}},y.prototype.guessLen13b=function(e,a){var s=Math.max(a,e)|1,f=s&1,A=0;for(s=s/2|0;s;s=s>>>1)A++;return 1<<A+1+f},y.prototype.conjugate=function(e,a,s){if(!(s<=1))for(var f=0;f<s/2;f++){var A=e[f];e[f]=e[s-f-1],e[s-f-1]=A,A=a[f],a[f]=-a[s-f-1],a[s-f-1]=-A}},y.prototype.normalize13b=function(e,a){for(var s=0,f=0;f<a/2;f++){var A=Math.round(e[2*f+1]/a)*8192+Math.round(e[2*f]/a)+s;e[f]=A&67108863,A<67108864?s=0:s=A/67108864|0}return e},y.prototype.convert13b=function(e,a,s,f){for(var A=0,C=0;C<a;C++)A=A+(e[C]|0),s[2*C]=A&8191,A=A>>>13,s[2*C+1]=A&8191,A=A>>>13;for(C=2*a;C<f;++C)s[C]=0;i(A===0),i((A&-8192)===0)},y.prototype.stub=function(e){for(var a=new Array(e),s=0;s<e;s++)a[s]=0;return a},y.prototype.mulp=function(e,a,s){var f=2*this.guessLen13b(e.length,a.length),A=this.makeRBT(f),C=this.stub(f),B=new Array(f),F=new Array(f),t=new Array(f),l=new Array(f),R=new Array(f),L=new Array(f),H=s.words;H.length=f,this.convert13b(e.words,e.length,B,f),this.convert13b(a.words,a.length,l,f),this.transform(B,C,F,t,f,A),this.transform(l,C,R,L,f,A);for(var d=0;d<f;d++){var $=F[d]*R[d]-t[d]*L[d];t[d]=F[d]*L[d]+t[d]*R[d],F[d]=$}return this.conjugate(F,t,f),this.transform(F,t,H,C,f,A),this.conjugate(H,C,f),this.normalize13b(H,f),s.negative=e.negative^a.negative,s.length=e.length+a.length,s.strip()},D.prototype.mul=function(e){var a=new D(null);return a.words=new Array(this.length+e.length),this.mulTo(e,a)},D.prototype.mulf=function(e){var a=new D(null);return a.words=new Array(this.length+e.length),_(this,e,a)},D.prototype.imul=function(e){return this.clone().mulTo(e,this)},D.prototype.imuln=function(e){i(typeof e=="number"),i(e<67108864);for(var a=0,s=0;s<this.length;s++){var f=(this.words[s]|0)*e,A=(f&67108863)+(a&67108863);a>>=26,a+=f/67108864|0,a+=A>>>26,this.words[s]=A&67108863}return a!==0&&(this.words[s]=a,this.length++),this},D.prototype.muln=function(e){return this.clone().imuln(e)},D.prototype.sqr=function(){return this.mul(this)},D.prototype.isqr=function(){return this.imul(this.clone())},D.prototype.pow=function(e){var a=k(e);if(a.length===0)return new D(1);for(var s=this,f=0;f<a.length&&a[f]===0;f++,s=s.sqr());if(++f<a.length)for(var A=s.sqr();f<a.length;f++,A=A.sqr())a[f]!==0&&(s=s.mul(A));return s},D.prototype.iushln=function(e){i(typeof e=="number"&&e>=0);var a=e%26,s=(e-a)/26,f=67108863>>>26-a<<26-a,A;if(a!==0){var C=0;for(A=0;A<this.length;A++){var B=this.words[A]&f,F=(this.words[A]|0)-B<<a;this.words[A]=F|C,C=B>>>26-a}C&&(this.words[A]=C,this.length++)}if(s!==0){for(A=this.length-1;A>=0;A--)this.words[A+s]=this.words[A];for(A=0;A<s;A++)this.words[A]=0;this.length+=s}return this.strip()},D.prototype.ishln=function(e){return i(this.negative===0),this.iushln(e)},D.prototype.iushrn=function(e,a,s){i(typeof e=="number"&&e>=0);var f;a?f=(a-a%26)/26:f=0;var A=e%26,C=Math.min((e-A)/26,this.length),B=67108863^67108863>>>A<<A,F=s;if(f-=C,f=Math.max(0,f),F){for(var t=0;t<C;t++)F.words[t]=this.words[t];F.length=C}if(C!==0)if(this.length>C)for(this.length-=C,t=0;t<this.length;t++)this.words[t]=this.words[t+C];else this.words[0]=0,this.length=1;var l=0;for(t=this.length-1;t>=0&&(l!==0||t>=f);t--){var R=this.words[t]|0;this.words[t]=l<<26-A|R>>>A,l=R&B}return F&&l!==0&&(F.words[F.length++]=l),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},D.prototype.ishrn=function(e,a,s){return i(this.negative===0),this.iushrn(e,a,s)},D.prototype.shln=function(e){return this.clone().ishln(e)},D.prototype.ushln=function(e){return this.clone().iushln(e)},D.prototype.shrn=function(e){return this.clone().ishrn(e)},D.prototype.ushrn=function(e){return this.clone().iushrn(e)},D.prototype.testn=function(e){i(typeof e=="number"&&e>=0);var a=e%26,s=(e-a)/26,f=1<<a;if(this.length<=s)return!1;var A=this.words[s];return!!(A&f)},D.prototype.imaskn=function(e){i(typeof e=="number"&&e>=0);var a=e%26,s=(e-a)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=s)return this;if(a!==0&&s++,this.length=Math.min(s,this.length),a!==0){var f=67108863^67108863>>>a<<a;this.words[this.length-1]&=f}return this.strip()},D.prototype.maskn=function(e){return this.clone().imaskn(e)},D.prototype.iaddn=function(e){return i(typeof e=="number"),i(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},D.prototype._iaddn=function(e){this.words[0]+=e;for(var a=0;a<this.length&&this.words[a]>=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},D.prototype.isubn=function(e){if(i(typeof e=="number"),i(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a<this.length&&this.words[a]<0;a++)this.words[a]+=67108864,this.words[a+1]-=1;return this.strip()},D.prototype.addn=function(e){return this.clone().iaddn(e)},D.prototype.subn=function(e){return this.clone().isubn(e)},D.prototype.iabs=function(){return this.negative=0,this},D.prototype.abs=function(){return this.clone().iabs()},D.prototype._ishlnsubmul=function(e,a,s){var f=e.length+s,A;this._expand(f);var C,B=0;for(A=0;A<e.length;A++){C=(this.words[A+s]|0)+B;var F=(e.words[A]|0)*a;C-=F&67108863,B=(C>>26)-(F/67108864|0),this.words[A+s]=C&67108863}for(;A<this.length-s;A++)C=(this.words[A+s]|0)+B,B=C>>26,this.words[A+s]=C&67108863;if(B===0)return this.strip();for(i(B===-1),B=0,A=0;A<this.length;A++)C=-(this.words[A]|0)+B,B=C>>26,this.words[A]=C&67108863;return this.negative=1,this.strip()},D.prototype._wordDiv=function(e,a){var s=this.length-e.length,f=this.clone(),A=e,C=A.words[A.length-1]|0,B=this._countBits(C);s=26-B,s!==0&&(A=A.ushln(s),f.iushln(s),C=A.words[A.length-1]|0);var F=f.length-A.length,t;if(a!=="mod"){t=new D(null),t.length=F+1,t.words=new Array(t.length);for(var l=0;l<t.length;l++)t.words[l]=0}var R=f.clone()._ishlnsubmul(A,1,F);R.negative===0&&(f=R,t&&(t.words[F]=1));for(var L=F-1;L>=0;L--){var H=(f.words[A.length+L]|0)*67108864+(f.words[A.length+L-1]|0);for(H=Math.min(H/C|0,67108863),f._ishlnsubmul(A,H,L);f.negative!==0;)H--,f.negative=0,f._ishlnsubmul(A,1,L),f.isZero()||(f.negative^=1);t&&(t.words[L]=H)}return t&&t.strip(),f.strip(),a!=="div"&&s!==0&&f.iushrn(s),{div:t||null,mod:f}},D.prototype.divmod=function(e,a,s){if(i(!e.isZero()),this.isZero())return{div:new D(0),mod:new D(0)};var f,A,C;return this.negative!==0&&e.negative===0?(C=this.neg().divmod(e,a),a!=="mod"&&(f=C.div.neg()),a!=="div"&&(A=C.mod.neg(),s&&A.negative!==0&&A.iadd(e)),{div:f,mod:A}):this.negative===0&&e.negative!==0?(C=this.divmod(e.neg(),a),a!=="mod"&&(f=C.div.neg()),{div:f,mod:C.mod}):this.negative&e.negative?(C=this.neg().divmod(e.neg(),a),a!=="div"&&(A=C.mod.neg(),s&&A.negative!==0&&A.isub(e)),{div:C.div,mod:A}):e.length>this.length||this.cmp(e)<0?{div:new D(0),mod:this}:e.length===1?a==="div"?{div:this.divn(e.words[0]),mod:null}:a==="mod"?{div:null,mod:new D(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new D(this.modn(e.words[0]))}:this._wordDiv(e,a)},D.prototype.div=function(e){return this.divmod(e,"div",!1).div},D.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},D.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},D.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var s=a.div.negative!==0?a.mod.isub(e):a.mod,f=e.ushrn(1),A=e.andln(1),C=s.cmp(f);return C<0||A===1&&C===0?a.div:a.div.negative!==0?a.div.isubn(1):a.div.iaddn(1)},D.prototype.modn=function(e){i(e<=67108863);for(var a=(1<<26)%e,s=0,f=this.length-1;f>=0;f--)s=(a*s+(this.words[f]|0))%e;return s},D.prototype.idivn=function(e){i(e<=67108863);for(var a=0,s=this.length-1;s>=0;s--){var f=(this.words[s]|0)+a*67108864;this.words[s]=f/e|0,a=f%e}return this.strip()},D.prototype.divn=function(e){return this.clone().idivn(e)},D.prototype.egcd=function(e){i(e.negative===0),i(!e.isZero());var a=this,s=e.clone();a.negative!==0?a=a.umod(e):a=a.clone();for(var f=new D(1),A=new D(0),C=new D(0),B=new D(1),F=0;a.isEven()&&s.isEven();)a.iushrn(1),s.iushrn(1),++F;for(var t=s.clone(),l=a.clone();!a.isZero();){for(var R=0,L=1;!(a.words[0]&L)&&R<26;++R,L<<=1);if(R>0)for(a.iushrn(R);R-- >0;)(f.isOdd()||A.isOdd())&&(f.iadd(t),A.isub(l)),f.iushrn(1),A.iushrn(1);for(var H=0,d=1;!(s.words[0]&d)&&H<26;++H,d<<=1);if(H>0)for(s.iushrn(H);H-- >0;)(C.isOdd()||B.isOdd())&&(C.iadd(t),B.isub(l)),C.iushrn(1),B.iushrn(1);a.cmp(s)>=0?(a.isub(s),f.isub(C),A.isub(B)):(s.isub(a),C.isub(f),B.isub(A))}return{a:C,b:B,gcd:s.iushln(F)}},D.prototype._invmp=function(e){i(e.negative===0),i(!e.isZero());var a=this,s=e.clone();a.negative!==0?a=a.umod(e):a=a.clone();for(var f=new D(1),A=new D(0),C=s.clone();a.cmpn(1)>0&&s.cmpn(1)>0;){for(var B=0,F=1;!(a.words[0]&F)&&B<26;++B,F<<=1);if(B>0)for(a.iushrn(B);B-- >0;)f.isOdd()&&f.iadd(C),f.iushrn(1);for(var t=0,l=1;!(s.words[0]&l)&&t<26;++t,l<<=1);if(t>0)for(s.iushrn(t);t-- >0;)A.isOdd()&&A.iadd(C),A.iushrn(1);a.cmp(s)>=0?(a.isub(s),f.isub(A)):(s.isub(a),A.isub(f))}var R;return a.cmpn(1)===0?R=f:R=A,R.cmpn(0)<0&&R.iadd(e),R},D.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),s=e.clone();a.negative=0,s.negative=0;for(var f=0;a.isEven()&&s.isEven();f++)a.iushrn(1),s.iushrn(1);do{for(;a.isEven();)a.iushrn(1);for(;s.isEven();)s.iushrn(1);var A=a.cmp(s);if(A<0){var C=a;a=s,s=C}else if(A===0||s.cmpn(1)===0)break;a.isub(s)}while(!0);return s.iushln(f)},D.prototype.invm=function(e){return this.egcd(e).a.umod(e)},D.prototype.isEven=function(){return(this.words[0]&1)===0},D.prototype.isOdd=function(){return(this.words[0]&1)===1},D.prototype.andln=function(e){return this.words[0]&e},D.prototype.bincn=function(e){i(typeof e=="number");var a=e%26,s=(e-a)/26,f=1<<a;if(this.length<=s)return this._expand(s+1),this.words[s]|=f,this;for(var A=f,C=s;A!==0&&C<this.length;C++){var B=this.words[C]|0;B+=A,A=B>>>26,B&=67108863,this.words[C]=B}return A!==0&&(this.words[C]=A,this.length++),this},D.prototype.isZero=function(){return this.length===1&&this.words[0]===0},D.prototype.cmpn=function(e){var a=e<0;if(this.negative!==0&&!a)return-1;if(this.negative===0&&a)return 1;this.strip();var s;if(this.length>1)s=1;else{a&&(e=-e),i(e<=67108863,"Number is too big");var f=this.words[0]|0;s=f===e?0:f<e?-1:1}return this.negative!==0?-s|0:s},D.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var a=this.ucmp(e);return this.negative!==0?-a|0:a},D.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var a=0,s=this.length-1;s>=0;s--){var f=this.words[s]|0,A=e.words[s]|0;if(f!==A){f<A?a=-1:f>A&&(a=1);break}}return a},D.prototype.gtn=function(e){return this.cmpn(e)===1},D.prototype.gt=function(e){return this.cmp(e)===1},D.prototype.gten=function(e){return this.cmpn(e)>=0},D.prototype.gte=function(e){return this.cmp(e)>=0},D.prototype.ltn=function(e){return this.cmpn(e)===-1},D.prototype.lt=function(e){return this.cmp(e)===-1},D.prototype.lten=function(e){return this.cmpn(e)<=0},D.prototype.lte=function(e){return this.cmp(e)<=0},D.prototype.eqn=function(e){return this.cmpn(e)===0},D.prototype.eq=function(e){return this.cmp(e)===0},D.red=function(e){return new Z(e)},D.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},D.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},D.prototype._forceRed=function(e){return this.red=e,this},D.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},D.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},D.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},D.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},D.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},D.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},D.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},D.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},D.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},D.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},D.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},D.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},D.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},D.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};function O(h,e){this.name=h,this.p=new D(e,16),this.n=this.p.bitLength(),this.k=new D(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var e=new D(null);return e.words=new Array(Math.ceil(this.n/13)),e},O.prototype.ireduce=function(e){var a=e,s;do this.split(a,this.tmp),a=this.imulK(a),a=a.iadd(this.tmp),s=a.bitLength();while(s>this.n);var f=s<this.n?-1:a.ucmp(this.p);return f===0?(a.words[0]=0,a.length=1):f>0?a.isub(this.p):a.strip!==void 0?a.strip():a._strip(),a},O.prototype.split=function(e,a){e.iushrn(this.n,0,a)},O.prototype.imulK=function(e){return e.imul(this.k)};function uu(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(uu,O),uu.prototype.split=function(e,a){for(var s=4194303,f=Math.min(e.length,9),A=0;A<f;A++)a.words[A]=e.words[A];if(a.length=f,e.length<=9){e.words[0]=0,e.length=1;return}var C=e.words[9];for(a.words[a.length++]=C&s,A=10;A<e.length;A++){var B=e.words[A]|0;e.words[A-10]=(B&s)<<4|C>>>22,C=B}C>>>=22,e.words[A-10]=C,C===0&&e.length>10?e.length-=10:e.length-=9},uu.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,s=0;s<e.length;s++){var f=e.words[s]|0;a+=f*977,e.words[s]=a&67108863,a=f*64+(a/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function J(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(J,O);function nu(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(nu,O);function Du(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(Du,O),Du.prototype.imulK=function(e){for(var a=0,s=0;s<e.length;s++){var f=(e.words[s]|0)*19+a,A=f&67108863;f>>>=26,e.words[s]=A,a=f}return a!==0&&(e.words[e.length++]=a),e},D._prime=function(e){if(S[e])return S[e];var a;if(e==="k256")a=new uu;else if(e==="p224")a=new J;else if(e==="p192")a=new nu;else if(e==="p25519")a=new Du;else throw new Error("Unknown prime "+e);return S[e]=a,a};function Z(h){if(typeof h=="string"){var e=D._prime(h);this.m=e.p,this.prime=e}else i(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}Z.prototype._verify1=function(e){i(e.negative===0,"red works only with positives"),i(e.red,"red works only with red numbers")},Z.prototype._verify2=function(e,a){i((e.negative|a.negative)===0,"red works only with positives"),i(e.red&&e.red===a.red,"red works only with red numbers")},Z.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},Z.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},Z.prototype.add=function(e,a){this._verify2(e,a);var s=e.add(a);return s.cmp(this.m)>=0&&s.isub(this.m),s._forceRed(this)},Z.prototype.iadd=function(e,a){this._verify2(e,a);var s=e.iadd(a);return s.cmp(this.m)>=0&&s.isub(this.m),s},Z.prototype.sub=function(e,a){this._verify2(e,a);var s=e.sub(a);return s.cmpn(0)<0&&s.iadd(this.m),s._forceRed(this)},Z.prototype.isub=function(e,a){this._verify2(e,a);var s=e.isub(a);return s.cmpn(0)<0&&s.iadd(this.m),s},Z.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},Z.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},Z.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},Z.prototype.isqr=function(e){return this.imul(e,e.clone())},Z.prototype.sqr=function(e){return this.mul(e,e)},Z.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(i(a%2===1),a===3){var s=this.m.add(new D(1)).iushrn(2);return this.pow(e,s)}for(var f=this.m.subn(1),A=0;!f.isZero()&&f.andln(1)===0;)A++,f.iushrn(1);i(!f.isZero());var C=new D(1).toRed(this),B=C.redNeg(),F=this.m.subn(1).iushrn(1),t=this.m.bitLength();for(t=new D(2*t*t).toRed(this);this.pow(t,F).cmp(B)!==0;)t.redIAdd(B);for(var l=this.pow(t,f),R=this.pow(e,f.addn(1).iushrn(1)),L=this.pow(e,f),H=A;L.cmp(C)!==0;){for(var d=L,$=0;d.cmp(C)!==0;$++)d=d.redSqr();i($<H);var j=this.pow(l,new D(1).iushln(H-$-1));R=R.redMul(j),l=j.redSqr(),L=L.redMul(l),H=$}return R},Z.prototype.invm=function(e){var a=e._invmp(this.m);return a.negative!==0?(a.negative=0,this.imod(a).redNeg()):this.imod(a)},Z.prototype.pow=function(e,a){if(a.isZero())return new D(1).toRed(this);if(a.cmpn(1)===0)return e.clone();var s=4,f=new Array(1<<s);f[0]=new D(1).toRed(this),f[1]=e;for(var A=2;A<f.length;A++)f[A]=this.mul(f[A-1],e);var C=f[0],B=0,F=0,t=a.bitLength()%26;for(t===0&&(t=26),A=a.length-1;A>=0;A--){for(var l=a.words[A],R=t-1;R>=0;R--){var L=l>>R&1;if(C!==f[0]&&(C=this.sqr(C)),L===0&&B===0){F=0;continue}B<<=1,B|=L,F++,!(F!==s&&(A!==0||R!==0))&&(C=this.mul(C,f[B]),F=0,B=0)}t=26}return C},Z.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},Z.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},D.mont=function(e){return new au(e)};function au(h){Z.call(this,h),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new D(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)}o(au,Z),au.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},au.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},au.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var s=e.imul(a),f=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=s.isub(f).iushrn(this.shift),C=A;return A.cmp(this.m)>=0?C=A.isub(this.m):A.cmpn(0)<0&&(C=A.iadd(this.m)),C._forceRed(this)},au.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new D(0)._forceRed(this);var s=e.mul(a),f=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=s.isub(f).iushrn(this.shift),C=A;return A.cmp(this.m)>=0?C=A.isub(this.m):A.cmpn(0)<0&&(C=A.iadd(this.m)),C._forceRed(this)},au.prototype.invm=function(e){var a=this.imod(e._invmp(this.m).mul(this.r2));return a._forceRed(this)}})(u,x.commonjsGlobal)})(he);var G2=he.exports;Object.defineProperty(K2,"__esModule",{value:!0});var m2=G2,w8=x.requireElliptic().ec,Ee=new w8("secp256k1"),$2=Ee.curve;K2.privateKeyExport=function(u,r){r===void 0&&(r=!0);var n=new m2(u);if(n.ucmp($2.n)>=0)throw new Error("couldn't export to DER format");var i=Ee.g.mul(n);return Ft(i.getX(),i.getY(),r)};K2.privateKeyModInverse=function(u){var r=new m2(u);if(r.ucmp($2.n)>=0||r.isZero())throw new Error("private key range is invalid");return r.invm($2.n).toArrayLike(x.dist.Buffer,"be",32)};K2.signatureImport=function(u){var r=new m2(u.r);r.ucmp($2.n)>=0&&(r=new m2(0));var n=new m2(u.s);return n.ucmp($2.n)>=0&&(n=new m2(0)),x.dist.Buffer.concat([r.toArrayLike(x.dist.Buffer,"be",32),n.toArrayLike(x.dist.Buffer,"be",32)])};K2.ecdhUnsafe=function(u,r,n){n===void 0&&(n=!0);var i=Ee.keyFromPublic(u),o=new m2(r);if(o.ucmp($2.n)>=0||o.isZero())throw new Error("scalar was invalid (zero or overflow)");var D=i.pub.mul(o);return Ft(D.getX(),D.getY(),n)};var Ft=function(u,r,n){var i;return n?(i=x.dist.Buffer.alloc(33),i[0]=r.isOdd()?3:2,u.toArrayLike(x.dist.Buffer,"be",32).copy(i,1)):(i=x.dist.Buffer.alloc(65),i[0]=4,u.toArrayLike(x.dist.Buffer,"be",32).copy(i,1),r.toArrayLike(x.dist.Buffer,"be",32).copy(i,33)),i},A1={};Object.defineProperty(A1,"__esModule",{value:!0});var x8=x.dist.Buffer.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),b8=x.dist.Buffer.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);A1.privateKeyExport=function(u,r,n){n===void 0&&(n=!0);var i=x.dist.Buffer.from(n?x8:b8);return u.copy(i,n?8:9),r.copy(i,n?181:214),i};A1.privateKeyImport=function(u){var r=u.length,n=0;if(r<n+1||u[n]!==48||(n+=1,r<n+1||!(u[n]&128)))return null;var i=u[n]&127;if(n+=1,i<1||i>2||r<n+i)return null;var o=u[n+i-1]|(i>1?u[n+i-2]<<8:0);return n+=i,r<n+o||r<n+3||u[n]!==2||u[n+1]!==1||u[n+2]!==1||(n+=3,r<n+2||u[n]!==4||u[n+1]>32||r<n+2+u[n+1])?null:u.slice(n+2,n+2+u[n+1])};A1.signatureImportLax=function(u){var r=x.dist.Buffer.alloc(32,0),n=x.dist.Buffer.alloc(32,0),i=u.length,o=0;if(u[o++]!==48)return null;var D=u[o++];if(D&128&&(o+=D-128,o>i)||u[o++]!==2)return null;var E=u[o++];if(E&128){if(D=E-128,o+D>i)return null;for(;D>0&&u[o]===0;o+=1,D-=1);for(E=0;D>0;o+=1,D-=1)E=(E<<8)+u[o]}if(E>i-o)return null;var c=o;if(o+=E,u[o++]!==2)return null;var p=u[o++];if(p&128){if(D=p-128,o+D>i)return null;for(;D>0&&u[o]===0;o+=1,D-=1);for(p=0;D>0;o+=1,D-=1)p=(p<<8)+u[o]}if(p>i-o)return null;var m=o;for(o+=p;E>0&&u[c]===0;E-=1,c+=1);if(E>32)return null;var v=u.slice(c,c+E);for(v.copy(r,32-v.length);p>0&&u[m]===0;p-=1,m+=1);if(p>32)return null;var I=u.slice(m,m+p);return I.copy(n,32-I.length),{r,s:n}};(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.ecdhUnsafe=u.ecdh=u.recover=u.verify=u.sign=u.signatureImportLax=u.signatureImport=u.signatureExport=u.signatureNormalize=u.publicKeyCombine=u.publicKeyTweakMul=u.publicKeyTweakAdd=u.publicKeyVerify=u.publicKeyConvert=u.publicKeyCreate=u.privateKeyTweakMul=u.privateKeyTweakAdd=u.privateKeyModInverse=u.privateKeyNegate=u.privateKeyImport=u.privateKeyExport=u.privateKeyVerify=void 0;var r=st,n=K2,i=A1;u.privateKeyVerify=function(o){return o.length!==32?!1:r.privateKeyVerify(Uint8Array.from(o))},u.privateKeyExport=function(o,D){if(o.length!==32)throw new RangeError("private key length is invalid");var E=n.privateKeyExport(o,D);return i.privateKeyExport(o,E,D)},u.privateKeyImport=function(o){if(o=i.privateKeyImport(o),o!==null&&o.length===32&&u.privateKeyVerify(o))return o;throw new Error("couldn't import from DER format")},u.privateKeyNegate=function(o){return x.dist.Buffer.from(r.privateKeyNegate(Uint8Array.from(o)))},u.privateKeyModInverse=function(o){if(o.length!==32)throw new Error("private key length is invalid");return x.dist.Buffer.from(n.privateKeyModInverse(Uint8Array.from(o)))},u.privateKeyTweakAdd=function(o,D){return x.dist.Buffer.from(r.privateKeyTweakAdd(Uint8Array.from(o),D))},u.privateKeyTweakMul=function(o,D){return x.dist.Buffer.from(r.privateKeyTweakMul(Uint8Array.from(o),Uint8Array.from(D)))},u.publicKeyCreate=function(o,D){return x.dist.Buffer.from(r.publicKeyCreate(Uint8Array.from(o),D))},u.publicKeyConvert=function(o,D){return x.dist.Buffer.from(r.publicKeyConvert(Uint8Array.from(o),D))},u.publicKeyVerify=function(o){return o.length!==33&&o.length!==65?!1:r.publicKeyVerify(Uint8Array.from(o))},u.publicKeyTweakAdd=function(o,D,E){return x.dist.Buffer.from(r.publicKeyTweakAdd(Uint8Array.from(o),Uint8Array.from(D),E))},u.publicKeyTweakMul=function(o,D,E){return x.dist.Buffer.from(r.publicKeyTweakMul(Uint8Array.from(o),Uint8Array.from(D),E))},u.publicKeyCombine=function(o,D){var E=[];return o.forEach(function(c){E.push(Uint8Array.from(c))}),x.dist.Buffer.from(r.publicKeyCombine(E,D))},u.signatureNormalize=function(o){return x.dist.Buffer.from(r.signatureNormalize(Uint8Array.from(o)))},u.signatureExport=function(o){return x.dist.Buffer.from(r.signatureExport(Uint8Array.from(o)))},u.signatureImport=function(o){return x.dist.Buffer.from(r.signatureImport(Uint8Array.from(o)))},u.signatureImportLax=function(o){if(o.length===0)throw new RangeError("signature length is invalid");var D=i.signatureImportLax(o);if(D===null)throw new Error("couldn't parse DER signature");return n.signatureImport(D)},u.sign=function(o,D,E){if(E===null)throw new TypeError("options should be an Object");var c=void 0;if(E){if(c={},E.data===null)throw new TypeError("options.data should be a Buffer");if(E.data){if(E.data.length!=32)throw new RangeError("options.data length is invalid");c.data=new Uint8Array(E.data)}if(E.noncefn===null)throw new TypeError("options.noncefn should be a Function");E.noncefn&&(c.noncefn=function(m,v,I,M,k){var b=I!=null?x.dist.Buffer.from(I):null,N=M!=null?x.dist.Buffer.from(M):null,g=x.dist.Buffer.from("");return E.noncefn&&(g=E.noncefn(x.dist.Buffer.from(m),x.dist.Buffer.from(v),b,N,k)),new Uint8Array(g)})}var p=r.ecdsaSign(Uint8Array.from(o),Uint8Array.from(D),c);return{signature:x.dist.Buffer.from(p.signature),recovery:p.recid}},u.verify=function(o,D,E){return r.ecdsaVerify(Uint8Array.from(D),Uint8Array.from(o),E)},u.recover=function(o,D,E,c){return x.dist.Buffer.from(r.ecdsaRecover(Uint8Array.from(D),E,Uint8Array.from(o),c))},u.ecdh=function(o,D){return x.dist.Buffer.from(r.ecdh(Uint8Array.from(o),Uint8Array.from(D),{}))},u.ecdhUnsafe=function(o,D,E){if(o.length!==33&&o.length!==65)throw new RangeError("public key length is invalid");if(D.length!==32)throw new RangeError("private key length is invalid");return x.dist.Buffer.from(n.ecdhUnsafe(Uint8Array.from(o),Uint8Array.from(D),E))}})(K1);var lt=function(r){if(typeof r!="string")throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof r+", while checking isHexPrefixed.");return r.slice(0,2)==="0x"},_8=lt,M8=function(r){return typeof r!="string"?r:_8(r)?r.slice(2):r},I8=lt,At=M8;function z1(u){var r=u;if(typeof r!="string")throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof r+", while padToEven.");return r.length%2&&(r="0"+r),r}function ht(u){var r=u.toString(16);return"0x"+r}function S8(u){var r=ht(u);return new x.dist.Buffer(z1(r.slice(2)),"hex")}function U8(u){if(typeof u!="string")throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof u+"'.");return x.dist.Buffer.byteLength(u,"utf8")}function T8(u,r,n){if(Array.isArray(u)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof u+"'");if(Array.isArray(r)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof r+"'");return r[!!n&&"some"||"every"](function(i){return u.indexOf(i)>=0})}function O8(u){var r=new x.dist.Buffer(z1(At(u).replace(/^0+|0+$/g,"")),"hex");return r.toString("utf8")}function k8(u){var r="",n=0,i=u.length;for(u.substring(0,2)==="0x"&&(n=2);n<i;n+=2){var o=parseInt(u.substr(n,2),16);r+=String.fromCharCode(o)}return r}function N8(u){var r=new x.dist.Buffer(u,"utf8");return"0x"+z1(r.toString("hex")).replace(/^0+|0+$/g,"")}function P8(u){for(var r="",n=0;n<u.length;n++){var i=u.charCodeAt(n),o=i.toString(16);r+=o.length<2?"0"+o:o}return"0x"+r}function R8(u,r,n){if(!Array.isArray(u))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof u+"'");if(typeof r!="string")throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof r+"'.");for(var i=[],o=0;o<u.length;o++){var D=u[o][r];if(n&&!D)D="";else if(typeof D!="string")throw new Error("invalid abi");i.push(D)}return i}function L8(u,r){return!(typeof u!="string"||!u.match(/^0x[0-9A-Fa-f]*$/)||r&&u.length!==2+2*r)}var w0={arrayContainsArray:T8,intToBuffer:S8,getBinarySize:U8,isHexPrefixed:I8,stripHexPrefix:At,padToEven:z1,intToHex:ht,fromAscii:P8,fromUtf8:N8,toAscii:k8,toUtf8:O8,getKeys:R8,isHexString:L8},Et={};(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.KECCAK256_RLP=u.KECCAK256_RLP_S=u.KECCAK256_RLP_ARRAY=u.KECCAK256_RLP_ARRAY_S=u.KECCAK256_NULL=u.KECCAK256_NULL_S=u.TWO_POW256=u.MAX_INTEGER=void 0;var r=G2;u.MAX_INTEGER=new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),u.TWO_POW256=new r("10000000000000000000000000000000000000000000000000000000000000000",16),u.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",u.KECCAK256_NULL=x.dist.Buffer.from(u.KECCAK256_NULL_S,"hex"),u.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",u.KECCAK256_RLP_ARRAY=x.dist.Buffer.from(u.KECCAK256_RLP_ARRAY_S,"hex"),u.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",u.KECCAK256_RLP=x.dist.Buffer.from(u.KECCAK256_RLP_S,"hex")})(Et);var ct={},z2={};(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.baToJSON=u.addHexPrefix=u.toUnsigned=u.fromSigned=u.bufferToHex=u.bufferToInt=u.toBuffer=u.stripZeros=u.unpad=u.setLengthRight=u.setLength=u.setLengthLeft=u.zeros=void 0;var r=w0,n=G2;u.zeros=function(i){return x.dist.Buffer.allocUnsafe(i).fill(0)},u.setLengthLeft=function(i,o,D){D===void 0&&(D=!1);var E=u.zeros(o);return i=u.toBuffer(i),D?i.length<o?(i.copy(E),E):i.slice(0,o):i.length<o?(i.copy(E,o-i.length),E):i.slice(-o)},u.setLength=u.setLengthLeft,u.setLengthRight=function(i,o){return u.setLength(i,o,!0)},u.unpad=function(i){i=r.stripHexPrefix(i);for(var o=i[0];i.length>0&&o.toString()==="0";)i=i.slice(1),o=i[0];return i},u.stripZeros=u.unpad,u.toBuffer=function(i){if(!x.dist.Buffer.isBuffer(i))if(Array.isArray(i))i=x.dist.Buffer.from(i);else if(typeof i=="string")if(r.isHexString(i))i=x.dist.Buffer.from(r.padToEven(r.stripHexPrefix(i)),"hex");else throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+i);else if(typeof i=="number")i=r.intToBuffer(i);else if(i==null)i=x.dist.Buffer.allocUnsafe(0);else if(n.isBN(i))i=i.toArrayLike(x.dist.Buffer);else if(i.toArray)i=x.dist.Buffer.from(i.toArray());else throw new Error("invalid type");return i},u.bufferToInt=function(i){return new n(u.toBuffer(i)).toNumber()},u.bufferToHex=function(i){return i=u.toBuffer(i),"0x"+i.toString("hex")},u.fromSigned=function(i){return new n(i).fromTwos(256)},u.toUnsigned=function(i){return x.dist.Buffer.from(i.toTwos(256).toArray())},u.addHexPrefix=function(i){return typeof i!="string"||r.isHexPrefixed(i)?i:"0x"+i},u.baToJSON=function(i){if(x.dist.Buffer.isBuffer(i))return"0x"+i.toString("hex");if(i instanceof Array){for(var o=[],D=0;D<i.length;D++)o.push(u.baToJSON(i[D]));return o}}})(z2);var q1={},q2={},ce={};Object.defineProperty(ce,"__esModule",{value:!0});function $8(u){return function(r){var n=u();return n.update(r),x.dist.Buffer.from(n.digest())}}ce.createHashFunction=$8;Object.defineProperty(q2,"__esModule",{value:!0});var Z1=ce,W1=x.js;q2.keccak224=Z1.createHashFunction(function(){return W1("keccak224")});q2.keccak256=Z1.createHashFunction(function(){return W1("keccak256")});q2.keccak384=Z1.createHashFunction(function(){return W1("keccak384")});q2.keccak512=Z1.createHashFunction(function(){return W1("keccak512")});(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.rlphash=u.ripemd160=u.sha256=u.keccak256=u.keccak=void 0;var r=q2,n=r.keccak224,i=r.keccak384,o=r.keccak256,D=r.keccak512,E=x.requireBrowser$1(),c=w0,p=x.dist_browser$1,m=z2;u.keccak=function(v,I){switch(I===void 0&&(I=256),typeof v=="string"&&!c.isHexString(v)?v=x.dist.Buffer.from(v,"utf8"):v=m.toBuffer(v),I||(I=256),I){case 224:return n(v);case 256:return o(v);case 384:return i(v);case 512:return D(v);default:throw new Error("Invald algorithm: keccak"+I)}},u.keccak256=function(v){return u.keccak(v)},u.sha256=function(v){return v=m.toBuffer(v),E("sha256").update(v).digest()},u.ripemd160=function(v,I){v=m.toBuffer(v);var M=E("rmd160").update(v).digest();return I===!0?m.setLength(M,32):M},u.rlphash=function(v){return u.keccak(p.encode(v))}})(q1);(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.importPublic=u.privateToPublic=u.privateToAddress=u.publicToAddress=u.pubToAddress=u.isValidPublic=u.isValidPrivate=u.isPrecompiled=u.generateAddress2=u.generateAddress=u.isValidChecksumAddress=u.toChecksumAddress=u.isZeroAddress=u.isValidAddress=u.zeroAddress=void 0;var r=x.requireAssert(),n=w0,i=K1,o=G2,D=z2,E=q1;u.zeroAddress=function(){var c=20,p=D.zeros(c);return D.bufferToHex(p)},u.isValidAddress=function(c){return/^0x[0-9a-fA-F]{40}$/.test(c)},u.isZeroAddress=function(c){var p=u.zeroAddress();return p===D.addHexPrefix(c)},u.toChecksumAddress=function(c,p){c=n.stripHexPrefix(c).toLowerCase();for(var m=p!==void 0?p.toString()+"0x":"",v=E.keccak(m+c).toString("hex"),I="0x",M=0;M<c.length;M++)parseInt(v[M],16)>=8?I+=c[M].toUpperCase():I+=c[M];return I},u.isValidChecksumAddress=function(c,p){return u.isValidAddress(c)&&u.toChecksumAddress(c,p)===c},u.generateAddress=function(c,p){c=D.toBuffer(c);var m=new o(p);return m.isZero()?E.rlphash([c,null]).slice(-20):E.rlphash([c,x.dist.Buffer.from(m.toArray())]).slice(-20)},u.generateAddress2=function(c,p,m){var v=D.toBuffer(c),I=D.toBuffer(p),M=D.toBuffer(m);r(v.length===20),r(I.length===32);var k=E.keccak256(x.dist.Buffer.concat([x.dist.Buffer.from("ff","hex"),v,I,E.keccak256(M)]));return k.slice(-20)},u.isPrecompiled=function(c){var p=D.unpad(c);return p.length===1&&p[0]>=1&&p[0]<=8},u.isValidPrivate=function(c){return i.privateKeyVerify(c)},u.isValidPublic=function(c,p){return p===void 0&&(p=!1),c.length===64?i.publicKeyVerify(x.dist.Buffer.concat([x.dist.Buffer.from([4]),c])):p?i.publicKeyVerify(c):!1},u.pubToAddress=function(c,p){return p===void 0&&(p=!1),c=D.toBuffer(c),p&&c.length!==64&&(c=i.publicKeyConvert(c,!1).slice(1)),r(c.length===64),E.keccak(c).slice(-20)},u.publicToAddress=u.pubToAddress,u.privateToAddress=function(c){return u.publicToAddress(u.privateToPublic(c))},u.privateToPublic=function(c){return c=D.toBuffer(c),i.publicKeyCreate(c,!1).slice(1)},u.importPublic=function(c){return c=D.toBuffer(c),c.length!==64&&(c=i.publicKeyConvert(c,!1).slice(1)),c}})(ct);var n0={};Object.defineProperty(n0,"__esModule",{value:!0});n0.hashPersonalMessage=n0.isValidSignature=n0.fromRpcSig=n0.toRpcSig=n0.ecrecover=n0.ecsign=void 0;var L9=K1,v1=G2,v2=z2,H8=q1;n0.ecsign=function(u,r,n){var i=L9.sign(u,r),o=i.recovery,D={r:i.signature.slice(0,32),s:i.signature.slice(32,64),v:n?o+(n*2+35):o+27};return D};n0.ecrecover=function(u,r,n,i,o){var D=x.dist.Buffer.concat([v2.setLength(n,32),v2.setLength(i,32)],64),E=Ce(r,o);if(!de(E))throw new Error("Invalid signature v value");var c=L9.recover(u,D,E);return L9.publicKeyConvert(c,!1).slice(1)};n0.toRpcSig=function(u,r,n,i){var o=Ce(u,i);if(!de(o))throw new Error("Invalid signature v value");return v2.bufferToHex(x.dist.Buffer.concat([v2.setLengthLeft(r,32),v2.setLengthLeft(n,32),v2.toBuffer(u)]))};n0.fromRpcSig=function(u){var r=v2.toBuffer(u);if(r.length!==65)throw new Error("Invalid signature length");var n=r[64];return n<27&&(n+=27),{v:n,r:r.slice(0,32),s:r.slice(32,64)}};n0.isValidSignature=function(u,r,n,i,o){i===void 0&&(i=!0);var D=new v1("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),E=new v1("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(r.length!==32||n.length!==32||!de(Ce(u,o)))return!1;var c=new v1(r),p=new v1(n);return!(c.isZero()||c.gt(E)||p.isZero()||p.gt(E)||i&&p.cmp(D)===1)};n0.hashPersonalMessage=function(u){var r=x.dist.Buffer.from(`Ethereum Signed Message: