edge-currency-accountbased 2.2.3 → 2.2.5

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 (76) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/android/src/main/assets/edge-currency-accountbased/1944.chunk.js +4 -0
  3. package/android/src/main/assets/edge-currency-accountbased/2153.chunk.js +2 -0
  4. package/android/src/main/assets/edge-currency-accountbased/2821.chunk.js +2 -0
  5. package/android/src/main/assets/edge-currency-accountbased/2896.chunk.js +35 -0
  6. package/android/src/main/assets/edge-currency-accountbased/2945.chunk.js +25 -0
  7. package/android/src/main/assets/edge-currency-accountbased/3491.chunk.js +1 -0
  8. package/android/src/main/assets/edge-currency-accountbased/{620.chunk.js → 3620.chunk.js} +1 -1
  9. package/android/src/main/assets/edge-currency-accountbased/{666.chunk.js → 3666.chunk.js} +1 -1
  10. package/android/src/main/assets/edge-currency-accountbased/3720.chunk.js +1 -0
  11. package/android/src/main/assets/edge-currency-accountbased/{978.chunk.js → 3978.chunk.js} +1 -1
  12. package/android/src/main/assets/edge-currency-accountbased/4251.chunk.js +4 -0
  13. package/android/src/main/assets/edge-currency-accountbased/4431.chunk.js +1 -0
  14. package/android/src/main/assets/edge-currency-accountbased/4618.chunk.js +20 -0
  15. package/android/src/main/assets/edge-currency-accountbased/{627.chunk.js → 4627.chunk.js} +1 -1
  16. package/android/src/main/assets/edge-currency-accountbased/4650.chunk.js +1 -0
  17. package/android/src/main/assets/edge-currency-accountbased/{826.chunk.js → 5179.chunk.js} +1 -1
  18. package/android/src/main/assets/edge-currency-accountbased/{835.chunk.js → 5835.chunk.js} +1 -1
  19. package/android/src/main/assets/edge-currency-accountbased/5836.chunk.js +1 -0
  20. package/android/src/main/assets/edge-currency-accountbased/6266.chunk.js +1 -0
  21. package/android/src/main/assets/edge-currency-accountbased/6291.chunk.js +58 -0
  22. package/android/src/main/assets/edge-currency-accountbased/6341.chunk.js +44 -0
  23. package/android/src/main/assets/edge-currency-accountbased/7221.chunk.js +1 -0
  24. package/android/src/main/assets/edge-currency-accountbased/7428.chunk.js +6 -0
  25. package/android/src/main/assets/edge-currency-accountbased/{481.chunk.js → 7481.chunk.js} +1 -1
  26. package/android/src/main/assets/edge-currency-accountbased/7542.chunk.js +1 -0
  27. package/android/src/main/assets/edge-currency-accountbased/7786.chunk.js +2 -0
  28. package/android/src/main/assets/edge-currency-accountbased/8190.chunk.js +1 -0
  29. package/android/src/main/assets/edge-currency-accountbased/{689.chunk.js → 8689.chunk.js} +1 -1
  30. package/android/src/main/assets/edge-currency-accountbased/{726.chunk.js → 8726.chunk.js} +1 -1
  31. package/android/src/main/assets/edge-currency-accountbased/9068.chunk.js +1 -0
  32. package/android/src/main/assets/edge-currency-accountbased/{223.chunk.js → 9223.chunk.js} +2 -2
  33. package/android/src/main/assets/edge-currency-accountbased/9539.chunk.js +10 -0
  34. package/android/src/main/assets/edge-currency-accountbased/{645.chunk.js → 9645.chunk.js} +6 -6
  35. package/android/src/main/assets/edge-currency-accountbased/9669.chunk.js +7 -0
  36. package/android/src/main/assets/edge-currency-accountbased/algorand.chunk.js +1 -1
  37. package/android/src/main/assets/edge-currency-accountbased/bnb.chunk.js +2 -2
  38. package/android/src/main/assets/edge-currency-accountbased/edge-currency-accountbased.js +2 -18
  39. package/android/src/main/assets/edge-currency-accountbased/eos.chunk.js +5 -5
  40. package/android/src/main/assets/edge-currency-accountbased/ethereum.chunk.js +2 -2
  41. package/android/src/main/assets/edge-currency-accountbased/filecoin.chunk.js +1 -1
  42. package/android/src/main/assets/edge-currency-accountbased/fio.chunk.js +2 -2
  43. package/android/src/main/assets/edge-currency-accountbased/hedera.chunk.js +2 -2
  44. package/android/src/main/assets/edge-currency-accountbased/polkadot.chunk.js +2 -2
  45. package/android/src/main/assets/edge-currency-accountbased/ripple.chunk.js +2 -2
  46. package/android/src/main/assets/edge-currency-accountbased/solana.chunk.js +2 -2
  47. package/android/src/main/assets/edge-currency-accountbased/stellar.chunk.js +2 -2
  48. package/android/src/main/assets/edge-currency-accountbased/tezos.chunk.js +2 -2
  49. package/android/src/main/assets/edge-currency-accountbased/tron.chunk.js +1 -1
  50. package/android/src/main/assets/edge-currency-accountbased/zcash.chunk.js +2 -2
  51. package/lib/ethereum/info/avalancheInfo.js +8 -0
  52. package/lib/ethereum/info/ethereumInfo.js +8 -0
  53. package/lib/filecoin/FilecoinEngine.js +112 -79
  54. package/lib/filecoin/Filfox.js +68 -1
  55. package/lib/filecoin/filecoinInfo.js +8 -3
  56. package/lib/filecoin/filecoinTypes.js +1 -6
  57. package/lib/zcash/ZcashEngine.js +11 -9
  58. package/package.json +1 -1
  59. package/android/src/main/assets/edge-currency-accountbased/124.chunk.js +0 -35
  60. package/android/src/main/assets/edge-currency-accountbased/17.chunk.js +0 -58
  61. package/android/src/main/assets/edge-currency-accountbased/190.chunk.js +0 -1
  62. package/android/src/main/assets/edge-currency-accountbased/221.chunk.js +0 -1
  63. package/android/src/main/assets/edge-currency-accountbased/298.chunk.js +0 -44
  64. package/android/src/main/assets/edge-currency-accountbased/431.chunk.js +0 -1
  65. package/android/src/main/assets/edge-currency-accountbased/491.chunk.js +0 -1
  66. package/android/src/main/assets/edge-currency-accountbased/539.chunk.js +0 -10
  67. package/android/src/main/assets/edge-currency-accountbased/542.chunk.js +0 -1
  68. package/android/src/main/assets/edge-currency-accountbased/618.chunk.js +0 -20
  69. package/android/src/main/assets/edge-currency-accountbased/650.chunk.js +0 -1
  70. package/android/src/main/assets/edge-currency-accountbased/68.chunk.js +0 -1
  71. package/android/src/main/assets/edge-currency-accountbased/720.chunk.js +0 -1
  72. package/android/src/main/assets/edge-currency-accountbased/786.chunk.js +0 -2
  73. package/android/src/main/assets/edge-currency-accountbased/836.chunk.js +0 -1
  74. package/android/src/main/assets/edge-currency-accountbased/935.chunk.js +0 -1
  75. package/android/src/main/assets/edge-currency-accountbased/944.chunk.js +0 -4
  76. package/android/src/main/assets/edge-currency-accountbased/945.chunk.js +0 -25
@@ -0,0 +1,44 @@
1
+ (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[6341],{62836:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.decodeFieldNumberAndTyp3=f.unMarshalBinaryBare=f.unMarshalBinaryLengthPrefixed=void 0;var u=r(e(38416)),i=r(e(94315)),g=e(74286),a=r(e(10881));function c(S,L){var I=Object.keys(S);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(S);L&&(T=T.filter(function(s){return Object.getOwnPropertyDescriptor(S,s).enumerable})),I.push.apply(I,T)}return I}function v(S){for(var L=1;L<arguments.length;L++){var I=arguments[L]!=null?arguments[L]:{};L%2?c(Object(I),!0).forEach(function(T){(0,u.default)(S,T,I[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(I)):c(Object(I)).forEach(function(T){Object.defineProperty(S,T,Object.getOwnPropertyDescriptor(I,T))})}return S}var m=function(L,I){var T=I.decode(L,0),s=I.encodingLength(T);return{val:T,offset:s}},b=function(L,I){if(L.length===0)throw new TypeError("Cannot decode empty bytes");var T=m(L,g.varint),s=T.offset;if(s<0)throw new Error("Error reading msg byte-length prefix: got code ".concat(s));return L=L.slice(s),N(L,I)};f.unMarshalBinaryLengthPrefixed=b;var N=function(L,I){if(!i.default.object(I))throw new TypeError("type should be object");if(!p.isBuffer(L))throw new TypeError("bytes must be buffer");if(i.default.array(I)){if(!i.default.object(I[0]))throw new TypeError("type should be object");return w(L,I[0])}return D(L,I)};f.unMarshalBinaryBare=N;var D=function(L,I,T){if(p.isBuffer(I))return m(L,g.bytes);if(i.default.array(I))return w(L,I);if(i.default.number(I))return m(L,g.varint);if(i.default.boolean(I))return m(L,g.bool);if(i.default.string(I))return m(L,g.string);if(i.default.object(I))return x(L,I,T)},H=function(L,I){i.default.object(L[I])&&(L[I]=null),i.default.number(L[I])&&(L[I]=0),i.default.boolean(L[I])&&(L[I]=!1),i.default.string(L[I])&&(L[I]="")},x=function(L,I,T){var s=0;if(T){var l=m(L,g.varint),h=l.offset;L=L.slice(h),s+=h}I.aminoPrefix&&(L=L.slice(4),s+=4);var E=0,j=Object.keys(I).filter(function(F){return F!=="aminoPrefix"});return j.forEach(function(F,W){if(i.default.array(I[F])){var d=w(L,I[F][0]),A=d.offset,k=d.val;s+=A,I[F]=k,L=L.slice(A)}else{var M=O(L),U=M.fieldNum,z=M.typ;if(W+1!==U||U<0){H(I,F);return}if(U<=E)throw new Error("encountered fieldNum: ".concat(U,", but we have already seen fnum: ").concat(E));if(E=U,W+1!==U)throw new Error("field number is not expected");var V=(0,a.default)(I[F]);if(z!==V)throw new Error("field type is not expected");L=L.slice(1);var Q=D(L,I[F],!0),Z=Q.val,J=Q.offset;I[F]=Z,L=L.slice(J),s+=J+1}}),{val:I,offset:s}},w=function(L,I){for(var T=[],s=0,l=O(L),h=l.fieldNum;;){var E=O(L),j=E.fieldNum;if(j!==h||j<0)break;if(L=L.slice(1),!(L.length>0&&L.readUInt8(0)===0)){var F=D(L,I,!0),W=F.offset,d=F.val;T.push(v({},d)),L=L.slice(W+1),s+=W+1,h=j}}return{val:T,offset:s}},O=function(L){if(L.length<2)return{fieldNum:-1};var I=m(L,g.varint),T=I.val,s=T&7,l=T>>3;if(l>1<<29-1)throw new Error("invalid field num ".concat(l));return{fieldNum:l,typ:s}};f.decodeFieldNumberAndTyp3=O},47070:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(64836);Object.defineProperty(f,"__esModule",{value:!0});var u={encodeNumber:!0,encodeBool:!0,encodeString:!0,encodeTime:!0,convertObjectToSignBytes:!0,marshalBinary:!0,marshalBinaryBare:!0,encodeBinary:!0,encodeBinaryByteArray:!0,encodeObjectBinary:!0,encodeArrayBinary:!0};f.encodeArrayBinary=f.encodeObjectBinary=f.encodeBinaryByteArray=f.encodeBinary=f.marshalBinaryBare=f.marshalBinary=f.convertObjectToSignBytes=f.encodeTime=f.encodeString=f.encodeBool=f.encodeNumber=void 0;var i=r(e(18698)),g=r(e(94315)),a=e(74286),c=r(e(10881)),v=e(34557);Object.keys(v).forEach(function(h){h==="default"||h==="__esModule"||Object.prototype.hasOwnProperty.call(u,h)||Object.defineProperty(f,h,{enumerable:!0,get:function(){return v[h]}})});var m=function h(E){if(E===null)return null;if((0,i.default)(E)!=="object")return E;if(Array.isArray(E))return E.map(h);var j=Object.keys(E).sort(),F={};return j.forEach(function(W){F[W]=h(E[W])}),F},b=function(E){return v.UVarInt.encode(E)};f.encodeNumber=b;var N=function(E){return E?v.UVarInt.encode(1):v.UVarInt.encode(0)};f.encodeBool=N;var D=function(E){var j=p.alloc(a.string.encodingLength(E));return a.string.encode(E,j,0)};f.encodeString=D;var H=function(E){var j=new Date(E).getTime(),F=Math.floor(j/1e3),W=Number(F.toString().padEnd(9,"0")),d=p.alloc(14);return d.writeInt32LE(1<<3|1,0),d.writeUInt32LE(F,1),d.writeInt32LE(2<<3|5,9),d.writeUInt32LE(W,10),d};f.encodeTime=H;var x=function(E){return p.from(JSON.stringify(m(E)))};f.convertObjectToSignBytes=x;var w=function(E){if(!g.default.object(E))throw new TypeError("data must be an object");return S(E,-1,!0).toString("hex")};f.marshalBinary=w;var O=function(E){if(!g.default.object(E))throw new TypeError("data must be an object");return S(E).toString("hex")};f.marshalBinaryBare=O;var S=function(E,j,F){if(E==null)throw new TypeError("unsupported type");if(p.isBuffer(E))return F?p.concat([v.UVarInt.encode(E.length),E]):E;if(g.default.array(E))return T(j,E,F);if(g.default.number(E))return b(E);if(g.default.boolean(E))return N(E);if(g.default.string(E))return D(E);if(g.default.object(E))return I(E,F)};f.encodeBinary=S;var L=function(E){var j=E.length;return p.concat([v.UVarInt.encode(j),E])};f.encodeBinaryByteArray=L;var I=function(E,j){var F=[];Object.keys(E).forEach(function(k,M){k==="aminoPrefix"||k==="version"||l(E[k])||(g.default.array(E[k])&&E[k].length>0?F.push(T(M,E[k])):(F.push(s(M,E[k])),F.push(S(E[k],M,!0))))});var W=p.concat(F);if(E.aminoPrefix){var d=p.from(E.aminoPrefix,"hex");W=p.concat([d,W])}if(j){var A=v.UVarInt.encode(W.length);W=p.concat([A,W])}return W};f.encodeObjectBinary=I;var T=function(E,j,F){var W=[];if(j.forEach(function(A){if(W.push(s(E,A)),l(A)){W.push(p.from("00","hex"));return}W.push(S(A,E,!0))}),F){var d=W.reduce(function(A,k){return A+k.length},0);W.unshift(v.UVarInt.encode(d))}return p.concat(W)};f.encodeArrayBinary=T;var s=function(E,j){E=Number(E);var F=E+1<<3|(0,c.default)(j);return v.UVarInt.encode(F)},l=function(E){return E===null?!1:g.default.number(E)&&E===0||g.default.string(E)&&E===""||g.default.array(E)&&E.length===0||g.default.boolean(E)&&!E}},34557:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.VarInt=f.UVarInt=void 0;var u=r(e(13550));function i(c){var v=function(D){if(c&&(D*=2),D<0)throw Error("varint value is out of bounds");var H=Math.log2(D+1);return Math.ceil(H/7)||1},m=function(D,H,x){if(D<0)throw Error("varint value is out of bounds");H=H||p.alloc(v(D)),x=x||0;var w=D.toString(),O=new u.default(w,10),S=new u.default(255),L=new u.default(128);c&&(O=O.muln(2));for(var I=0;O.gten(128);)H[x+I]=O.and(S).or(L).toNumber(),O=O.shrn(7),I++;return H[x+I]=O.andln(255),H},b=function(D){for(var H=0,x=0,w=0,O=D.length;w<O;w++){var S=D[w];if(S<128)return w>9||w===9&&S>1?0:H|S<<x;H|=(S&127)<<x,x+=7}return 0};return{encode:m,decode:b,encodingLength:v}}var g=i(!1);f.UVarInt=g;var a=i(!0);f.VarInt=a},57255:function(G,f,e){"use strict";var p=e(75263);Object.defineProperty(f,"__esModule",{value:!0});var r={decoder:!0,encoder:!0};f.encoder=f.decoder=void 0;var u=p(e(62836));f.decoder=u,Object.keys(u).forEach(function(g){g==="default"||g==="__esModule"||Object.prototype.hasOwnProperty.call(r,g)||Object.defineProperty(f,g,{enumerable:!0,get:function(){return u[g]}})});var i=p(e(47070));f.encoder=i,Object.keys(i).forEach(function(g){g==="default"||g==="__esModule"||Object.prototype.hasOwnProperty.call(r,g)||Object.defineProperty(f,g,{enumerable:!0,get:function(){return i[g]}})})},35241:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.Bridge=void 0;var u=r(e(64687)),i=r(e(17156)),g=r(e(56690)),a=r(e(89728)),c=r(e(38416)),v=e(23898),m=e(54684),b=function(){function N(D){(0,g.default)(this,N),(0,c.default)(this,"_bncClient",void 0),this._bncClient=D}return(0,a.default)(N,[{key:"transferIn",value:function(){var D=(0,i.default)(u.default.mark(function x(w){var O,S,L,I,T,s,l,h,E,j,F,W;return u.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(O=w.sequence,S=w.contract_address,L=w.refund_addresses,I=w.receiver_addresses,T=w.amounts,s=w.relay_fee,l=w.expire_time,h=w.symbol,E=w.fromAddress,!(O<0)){A.next=3;break}throw new Error("sequence should not be less than 0");case 3:if(S){A.next=5;break}throw new Error("contract address should not be empty");case 5:if(s){A.next=7;break}throw new Error("relay fee should not be empty");case 7:if(h){A.next=9;break}throw new Error("symbol should not be null");case 9:if((0,v.checkAddress)(E,this._bncClient.addressPrefix)){A.next=11;break}throw new Error("fromAddress is not a valid Binance Chain address");case 11:if(!(L.length!=I.length||L.length!=T.length)){A.next=13;break}throw new Error("the length of refund address array, recipient address array and transfer amount array must be the same");case 13:return j=I.map(function(k){var M=k.startsWith("tbnb")?"tbnb":"bnb";if(!(0,v.checkAddress)(k,M))throw new Error("".concat(k," in receiver_addresses is not a valid Binance Chain address"));return(0,v.decodeAddress)(k)}),F=L.map(function(k){if(!k.startsWith("0x"))throw new Error("".concat(k," is invalid"));return p.from(k.slice(2),"hex")}),W=p.from(JSON.stringify({contract_address:S,refund_addresses:F,receiver_addresses:j,amounts:T,symbol:h,relay_fee:s,expire_time:l})).toString("hex"),A.abrupt("return",this.buildClaimAndBroadcast({claimHex:W,claim_type:m.ClaimTypes.ClaimTypeTransferIn,fromAddress:E,sequence:O}));case 17:case"end":return A.stop()}},x,this)}));function H(x){return D.apply(this,arguments)}return H}()},{key:"transferOutRefund",value:function(){var D=(0,i.default)(u.default.mark(function x(w){var O,S,L,I,T,s;return u.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(O=w.transfer_out_sequence,S=w.refund_address,L=w.refund_reason,I=w.amount,T=w.fromAddress,!(O<0)){h.next=3;break}throw new Error("sequence should not be less than 0");case 3:if(I){h.next=5;break}throw new Error("amount should not be empty");case 5:if(L){h.next=7;break}throw new Error("empty refund reason");case 7:if((0,v.checkAddress)(T,this._bncClient.addressPrefix)){h.next=9;break}throw new Error("fromAddress is not a valid Binance Chain address");case 9:return s=p.from(JSON.stringify({transfer_out_sequence:O,refund_address:S,amount:I,refund_reason:L})).toString("hex"),h.abrupt("return",this.buildClaimAndBroadcast({claimHex:s,claim_type:m.ClaimTypes.ClaimTypeTransferOutRefund,sequence:O,fromAddress:T}));case 11:case"end":return h.stop()}},x,this)}));function H(x){return D.apply(this,arguments)}return H}()},{key:"bind",value:function(){var D=(0,i.default)(u.default.mark(function x(w){var O,S,L,I,T,s,l;return u.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(O=w.contractAddress,S=w.contractDecimal,L=w.amount,I=w.symbol,T=w.expireTime,s=w.fromAddress,(0,v.checkAddress)(s,this._bncClient.addressPrefix)){E.next=3;break}throw new Error("fromAddress is not a valid Binance Chain address");case 3:if(O.startsWith("0x")){E.next=5;break}throw new Error('contractAddress "'.concat(O,'" is invalid'));case 5:return l=new m.BindMsg({from:s,amount:L,contract_address:O,contract_decimals:S,expire_time:T,symbol:I}),E.next=8,this.broadcast(l,s);case 8:return E.abrupt("return",E.sent);case 9:case"end":return E.stop()}},x,this)}));function H(x){return D.apply(this,arguments)}return H}()},{key:"transferFromBcToBsc",value:function(){var D=(0,i.default)(u.default.mark(function x(w){var O,S,L,I,T,s;return u.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(O=w.toAddress,S=w.amount,L=w.symbol,I=w.expireTime,T=w.fromAddress,(0,v.checkAddress)(T,this._bncClient.addressPrefix)){h.next=3;break}throw new Error("fromAddress is not a valid Binance Chain address");case 3:if(O.startsWith("0x")){h.next=5;break}throw new Error('toAddress "'.concat(O,'" is invalid'));case 5:return s=new m.TransferOutMsg({from:T,to:O,amount:{denom:L,amount:S},expire_time:I}),h.abrupt("return",this.broadcast(s,T));case 7:case"end":return h.stop()}},x,this)}));function H(x){return D.apply(this,arguments)}return H}()},{key:"upateBind",value:function(){var D=(0,i.default)(u.default.mark(function x(w){var O,S,L,I,T,s;return u.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(O=w.sequence,S=w.contract_address,L=w.symbol,I=w.status,T=w.fromAddress,(0,v.checkAddress)(T,this._bncClient.addressPrefix)){h.next=3;break}throw new Error("fromAddress is not a valid Binance Chain address");case 3:if(S.startsWith("0x")){h.next=5;break}throw new Error('toAddress "'.concat(S,'" is invalid'));case 5:return s=p.from(JSON.stringify({status:I,symbol:L,contract_address:S})).toString("hex"),h.abrupt("return",this.buildClaimAndBroadcast({claimHex:s,sequence:O,fromAddress:T,claim_type:m.ClaimTypes.ClaimTypeUpdateBind}));case 7:case"end":return h.stop()}},x,this)}));function H(x){return D.apply(this,arguments)}return H}()},{key:"skipSequence",value:function(){var D=(0,i.default)(u.default.mark(function x(w){var O,S,L,I;return u.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(O=w.sequence,S=w.sequenceToSkip,L=w.fromAddress,!(O<0)){s.next=3;break}throw new Error("sequence should not be less than 0");case 3:if((0,v.checkAddress)(L,this._bncClient.addressPrefix)){s.next=5;break}throw new Error("fromAddress is not a valid Binance Chain address");case 5:return I=p.from(JSON.stringify({claim_type:m.ClaimTypes.ClaimTypeUpdateBind,sequence:S})).toString("hex"),s.abrupt("return",this.buildClaimAndBroadcast({claimHex:I,sequence:O,fromAddress:L,claim_type:m.ClaimTypes.ClaimTypeSkipSequence}));case 7:case"end":return s.stop()}},x,this)}));function H(x){return D.apply(this,arguments)}return H}()},{key:"buildClaimAndBroadcast",value:function(){var D=(0,i.default)(u.default.mark(function x(w){var O,S,L,I,T;return u.default.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return O=w.claimHex,S=w.claim_type,L=w.sequence,I=w.fromAddress,T=new m.ClaimMsg({claim_type:S,sequence:L,claim:O,validator_address:I}),l.next=4,this.broadcast(T,I,L);case 4:return l.abrupt("return",l.sent);case 5:case"end":return l.stop()}},x,this)}));function H(x){return D.apply(this,arguments)}return H}()},{key:"broadcast",value:function(){var D=(0,i.default)(u.default.mark(function x(w,O,S){var L;return u.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,this._bncClient._prepareTransaction(w.getMsg(),w.getSignMsg(),O,S);case 2:return L=T.sent,T.abrupt("return",this._bncClient._broadcastDelegate(L));case 4:case"end":return T.stop()}},x,this)}));function H(x,w,O){return D.apply(this,arguments)}return H}()}]),N}();f.Bridge=b},98867:function(G,f,e){"use strict";var p=e(75263),r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=f.voteOption=void 0;var u=r(e(64687)),i=r(e(17156)),g=r(e(56690)),a=r(e(89728)),c=r(e(38416)),v=r(e(93302)),m=p(e(23898)),b=e(54684),N=e(72731),D=r(e(80722)),H=Math.pow(10,8),x={4:"ListTradingPair",0:"Nil",1:"Text",2:"ParameterChange",3:"SoftwareUpgrade",5:"FeeChange",6:"CreateValidator",7:"RemoveValidator"},w={OptionEmpty:0,OptionYes:1,OptionAbstain:2,OptionNo:3,OptionNoWithVeto:4};f.voteOption=w;var O={0:"Empty",1:"Yes",2:"Abstain",3:"No",4:"NoWithVeto"},S=function(){function I(T){return(0,g.default)(this,I),(0,c.default)(this,"_bncClient",void 0),I.instance||(this._bncClient=T,I.instance=this),I.instance}return(0,a.default)(I,[{key:"submitListProposal",value:function(){var T=(0,i.default)(u.default.mark(function l(h){var E,j,F,W,d,A;return u.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return E={base_asset_symbol:h.baseAsset,quote_asset_symbol:h.quoteAsset,init_price:+new v.default(h.initPrice).mul(H).toString(),description:h.description,expire_time:new Date(h.expireTime).toISOString()},j=JSON.stringify(E),F=h.address,W=h.title,d=h.initialDeposit,A=h.votingPeriod,M.next=5,this.submitProposal(F,W,j,D.default.ProposalTypeListTradingPair,d,A);case 5:return M.abrupt("return",M.sent);case 6:case"end":return M.stop()}},l,this)}));function s(l){return T.apply(this,arguments)}return s}()},{key:"submitProposal",value:function(){var T=(0,i.default)(u.default.mark(function l(h,E,j,F,W,d){var A,k,M,U,z;return u.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return A=m.decodeAddress(h),k=[{denom:"BNB",amount:new v.default(W).mul(H).toString()}],d=+new v.default(d).mul(Math.pow(10,9)).toString(),M={title:E,description:j,proposal_type:F,proposer:A,initial_deposit:[{denom:"BNB",amount:+new v.default(W).mul(H).toString()}],voting_period:d,aminoPrefix:b.AminoPrefix.MsgSubmitProposal},U={description:j,initial_deposit:k,proposal_type:x[F],proposer:h,title:E,voting_period:d.toString()},Q.next=7,this._bncClient._prepareTransaction(M,U,h);case 7:return z=Q.sent,Q.abrupt("return",this._bncClient._broadcastDelegate(z));case 9:case"end":return Q.stop()}},l,this)}));function s(l,h,E,j,F,W){return T.apply(this,arguments)}return s}()},{key:"deposit",value:function(){var T=(0,i.default)(u.default.mark(function l(h,E,j){var F,W,d,A,k;return u.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return F=m.decodeAddress(E),(0,N.checkCoins)(j),W=[],j.forEach(function(z){W.push({denom:z.denom,amount:+new v.default(z.amount).mul(H).toString()})}),d={proposal_id:h,depositer:F,amount:W,aminoPrefix:b.AminoPrefix.MsgDeposit},A={amount:W.map(function(z){return{denom:z.denom,amount:String(z.amount)}}),depositer:E,proposal_id:String(h)},U.next=8,this._bncClient._prepareTransaction(d,A,E);case 8:return k=U.sent,U.abrupt("return",this._bncClient._broadcastDelegate(k));case 10:case"end":return U.stop()}},l,this)}));function s(l,h,E){return T.apply(this,arguments)}return s}()},{key:"vote",value:function(){var T=(0,i.default)(u.default.mark(function l(h,E,j){var F,W,d,A;return u.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return F=m.decodeAddress(E),W={proposal_id:h,voter:F,option:j,aminoPrefix:b.AminoPrefix.MsgVote},d={option:O[j],proposal_id:String(h),voter:E},M.next=5,this._bncClient._prepareTransaction(W,d,E);case 5:return A=M.sent,M.abrupt("return",this._bncClient._broadcastDelegate(A));case 7:case"end":return M.stop()}},l,this)}));function s(l,h,E){return T.apply(this,arguments)}return s}()}]),I}();(0,c.default)(S,"instance",void 0);var L=S;f.default=L},80722:function(G,f){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var e=0,p=1,r=2,u=3,i=4,g=5,a=6,c=7,v={ProposalTypeNil:e,ProposalTypeText:p,ProposalTypeParameterChange:r,ProposalTypeSoftwareUpgrade:u,ProposalTypeListTradingPair:i,ProposalTypeFeeChange:g,ProposalTypeCreateValidator:a,ProposalTypeRemoveValidator:c};f.default=v},86052:function(G,f,e){"use strict";var p=e(75263),r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.BncClient=f.LedgerSigningDelegate=f.DefaultBroadcastDelegate=f.DefaultSigningDelegate=f.NETWORK_PREFIX_MAPPING=f.api=void 0;var u=r(e(56690)),i=r(e(89728)),g=r(e(38416)),a=r(e(64687)),c=r(e(17156)),v=r(e(93302)),m=p(e(23898)),b=r(e(62455)),N=e(54684),D=r(e(33021)),H=e(72731),x=r(e(98867)),w=r(e(18620)),O=p(e(15683)),S=e(35241),L=e(92636);function I(k,M){var U=Object.keys(k);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(k);M&&(z=z.filter(function(V){return Object.getOwnPropertyDescriptor(k,V).enumerable})),U.push.apply(U,z)}return U}function T(k){for(var M=1;M<arguments.length;M++){var U=arguments[M]!=null?arguments[M]:{};M%2?I(Object(U),!0).forEach(function(z){(0,g.default)(k,z,U[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(U)):I(Object(U)).forEach(function(z){Object.defineProperty(k,z,Object.getOwnPropertyDescriptor(U,z))})}return k}var s=Math.pow(10,8),l={broadcast:"/api/v1/broadcast",nodeInfo:"/api/v1/node-info",getAccount:"/api/v1/account",getMarkets:"/api/v1/markets",getSwaps:"/api/v1/atomic-swaps",getOpenOrders:"/api/v1/orders/open",getDepth:"/api/v1/depth",getTransactions:"/api/v1/transactions",getTxs:"/bc/api/v1/txs",getTx:"/api/v1/tx"};f.api=l;var h={testnet:"tbnb",mainnet:"bnb"};f.NETWORK_PREFIX_MAPPING=h;var E=function(){var k=(0,c.default)(a.default.mark(function M(U,z){var V;return a.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(V=this.getPrivateKey(),V){Z.next=3;break}return Z.abrupt("return",Promise.reject("Private key has to be set before signing a transaction"));case 3:return Z.abrupt("return",U.sign(V,z));case 4:case"end":return Z.stop()}},M,this)}));return function(U,z,V){return k.apply(this,arguments)}}();f.DefaultSigningDelegate=E;var j=function(){var k=(0,c.default)(a.default.mark(function M(U){return a.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.abrupt("return",this.sendTransaction(U,!0));case 1:case"end":return V.stop()}},M,this)}));return function(U,z){return k.apply(this,arguments)}}();f.DefaultBroadcastDelegate=j;var F=function(M,U,z,V,Q){return function(){var Z=(0,c.default)(a.default.mark(function J(X,q){var te,re,se,ne;return a.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return te=X.getSignBytes(q),U&&U(te),le.prev=2,le.next=5,M.getPublicKey(Q);case 5:return re=le.sent,le.next=8,M.sign(te,Q);case 8:se=le.sent,z&&z(re,se),le.next=16;break;case 12:le.prev=12,le.t0=le.catch(2),console.warn("LedgerSigningDelegate error",le.t0),V&&V(le.t0);case 16:if(!(se&&se.signature)){le.next=19;break}return ne=m.getPublicKey(re.pk.toString("hex")),le.abrupt("return",X.addSignature(ne,se.signature));case 19:return le.abrupt("return",X);case 20:case"end":return le.stop()}},J,null,[[2,12]])}));return function(J,X){return Z.apply(this,arguments)}}()};f.LedgerSigningDelegate=F;var W=function(M){M.forEach(function(U){var z=U.coins||[];z.forEach(function(V){if((0,H.checkNumber)(V.amount),!V.denom)throw new Error("invalid denmon")})})},d=function(M,U){U.forEach(function(z){var V=M[0].coins.find(function(Z){return Z.denom===z.denom});if(V){var Q=new v.default(V.amount);V.amount=Number(Q.plus(z.amount).toString())}else M[0].coins.push(T({},z))})},A=function(){function k(M){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if((0,u.default)(this,k),(0,g.default)(this,"_httpClient",void 0),(0,g.default)(this,"_signingDelegate",void 0),(0,g.default)(this,"_broadcastDelegate",void 0),(0,g.default)(this,"_useAsyncBroadcast",void 0),(0,g.default)(this,"_source",void 0),(0,g.default)(this,"tokens",void 0),(0,g.default)(this,"swap",void 0),(0,g.default)(this,"gov",void 0),(0,g.default)(this,"bridge",void 0),(0,g.default)(this,"stake",void 0),(0,g.default)(this,"chainId",void 0),(0,g.default)(this,"addressPrefix","tbnb"),(0,g.default)(this,"network","testnet"),(0,g.default)(this,"address",void 0),(0,g.default)(this,"_setPkPromise",void 0),(0,g.default)(this,"account_number",void 0),(0,g.default)(this,"_privateKey",null),!M)throw new Error("Binance chain server should not be null");this._httpClient=new D.default(M),this._signingDelegate=E,this._broadcastDelegate=j,this._useAsyncBroadcast=U,this._source=z,this.tokens=new O.default(this),this.swap=new w.default(this),this.gov=new x.default(this),this.bridge=new S.Bridge(this),this.stake=new L.Stake(this)}return(0,i.default)(k,[{key:"initChain",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V;return a.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(this.chainId){Z.next=5;break}return Z.next=3,this._httpClient.request("get",l.nodeInfo);case 3:V=Z.sent,this.chainId=V.result.node_info&&V.result.node_info.network;case 5:return Z.abrupt("return",this);case 6:case"end":return Z.stop()}},z,this)}));function U(){return M.apply(this,arguments)}return U}()},{key:"chooseNetwork",value:function(U){this.addressPrefix=h[U]||"tbnb",this.network=h[U]?U:"testnet"}},{key:"setPrivateKey",value:function(){var M=(0,c.default)(a.default.mark(function z(V){var Q,Z,J,X,q=arguments;return a.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(Q=q.length>1&&q[1]!==void 0?q[1]:!1,V===this._privateKey){re.next=19;break}if(Z=m.getAddressFromPrivateKey(V,this.addressPrefix),Z){re.next=5;break}throw new Error("address is falsy: ".concat(Z,". invalid private key?"));case 5:if(this._privateKey=V,this.address=Z,Q){re.next=19;break}return re.prev=8,J=this._setPkPromise=this._httpClient.request("get","".concat(l.getAccount,"/").concat(Z)),re.next=12,J;case 12:X=re.sent,this.account_number=X.result.account_number,re.next=19;break;case 16:throw re.prev=16,re.t0=re.catch(8),new Error("unable to query the address on the blockchain. try sending it some funds first: ".concat(Z));case 19:return re.abrupt("return",this);case 20:case"end":return re.stop()}},z,this,[[8,16]])}));function U(z){return M.apply(this,arguments)}return U}()},{key:"removePrivateKey",value:function(){return this._privateKey=null,this}},{key:"getPrivateKey",value:function(){return this._privateKey}},{key:"setAccountNumber",value:function(U){this.account_number=U}},{key:"useAsyncBroadcast",value:function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._useAsyncBroadcast=U,this}},{key:"setSigningDelegate",value:function(U){if(typeof U!="function")throw new Error("signing delegate must be a function");return this._signingDelegate=U,this}},{key:"setBroadcastDelegate",value:function(U){if(typeof U!="function")throw new Error("broadcast delegate must be a function");return this._broadcastDelegate=U,this}},{key:"useDefaultSigningDelegate",value:function(){return this._signingDelegate=E,this}},{key:"useDefaultBroadcastDelegate",value:function(){return this._broadcastDelegate=j,this}},{key:"useLedgerSigningDelegate",value:function(){return this._signingDelegate=F.apply(void 0,arguments),this}},{key:"transfer",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q,Z,J){var X,q,te,re,se,ne,be,le,fe=arguments;return a.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return X=fe.length>4&&fe[4]!==void 0?fe[4]:"",q=fe.length>5&&fe[5]!==void 0?fe[5]:null,te=m.decodeAddress(V),re=m.decodeAddress(Q),Z=new v.default(Z),Z=Number(Z.mul(s).toString()),(0,H.checkNumber)(Z,"amount"),se={denom:J,amount:Z},ne={inputs:[{address:te,coins:[se]}],outputs:[{address:re,coins:[se]}],aminoPrefix:N.AminoPrefix.MsgSend},be={inputs:[{address:V,coins:[{amount:Z,denom:J}]}],outputs:[{address:Q,coins:[{amount:Z,denom:J}]}]},pe.next=12,this._prepareTransaction(ne,be,V,q,X);case 12:return le=pe.sent,pe.abrupt("return",this._broadcastDelegate(le));case 14:case"end":return pe.stop()}},z,this)}));function U(z,V,Q,Z){return M.apply(this,arguments)}return U}()},{key:"multiSend",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q){var Z,J,X,q,te,re,se,ne,be,le,fe=arguments;return a.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(Z=fe.length>2&&fe[2]!==void 0?fe[2]:"",J=fe.length>3&&fe[3]!==void 0?fe[3]:null,V){pe.next=4;break}throw new Error("fromAddress should not be falsy");case 4:if(Array.isArray(Q)){pe.next=6;break}throw new Error("outputs should be array");case 6:return W(Q),Q.forEach(function(Te){Te.coins=Te.coins.sort(function(Ee,xe){return Ee.denom.localeCompare(xe.denom)}),Te.coins.forEach(function(Ee){var xe=new v.default(Ee.amount);Ee.amount=Number(xe.mul(s).toString())})}),X=m.decodeAddress(V),q=[{address:X,coins:[]}],te=[],Q.forEach(function(Te){var Ee=m.decodeAddress(Te.to);d(q,Te.coins),te.push({address:Ee,coins:Te.coins})}),re={inputs:q,outputs:te,aminoPrefix:N.AminoPrefix.MsgSend},se=[{address:V,coins:[]}],ne=[],Q.forEach(function(Te,Ee){ne.push({address:Te.to,coins:[]}),Te.coins.forEach(function(xe){ne[Ee].coins.push(xe)}),d(se,Te.coins)}),be={inputs:se,outputs:ne},pe.next=19,this._prepareTransaction(re,be,V,J,Z);case 19:return le=pe.sent,pe.abrupt("return",this._broadcastDelegate(le));case 21:case"end":return pe.stop()}},z,this)}));function U(z,V){return M.apply(this,arguments)}return U}()},{key:"cancelOrder",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q,Z){var J,X,q,te,re,se=arguments;return a.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return J=se.length>3&&se[3]!==void 0?se[3]:null,X=m.decodeAddress(V),q={sender:X,symbol:Q,refid:Z,aminoPrefix:N.AminoPrefix.CancelOrderMsg},te={refid:Z,sender:V,symbol:Q},be.next=6,this._prepareTransaction(q,te,V,J,"");case 6:return re=be.sent,be.abrupt("return",this._broadcastDelegate(re));case 8:case"end":return be.stop()}},z,this)}));function U(z,V,Q){return M.apply(this,arguments)}return U}()},{key:"placeOrder",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z,J,X,q,te,re,se,ne,be,le,fe,ce,pe=arguments;return a.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(V=pe.length>0&&pe[0]!==void 0?pe[0]:this.address,Q=pe.length>1?pe[1]:void 0,Z=pe.length>2?pe[2]:void 0,J=pe.length>3?pe[3]:void 0,X=pe.length>4?pe[4]:void 0,q=pe.length>5&&pe[5]!==void 0?pe[5]:null,te=pe.length>6&&pe[6]!==void 0?pe[6]:1,V){Ee.next=9;break}throw new Error("address should not be falsy");case 9:if(Q){Ee.next=11;break}throw new Error("symbol should not be falsy");case 11:if(!(Z!==1&&Z!==2)){Ee.next=13;break}throw new Error("side can only be 1 or 2");case 13:if(!(te!==1&&te!==3)){Ee.next=15;break}throw new Error("timeinforce can only be 1 or 3");case 15:if(re=m.decodeAddress(V),!(q!==0&&!q)){Ee.next=21;break}return Ee.next=19,this._httpClient.request("get","".concat(l.getAccount,"/").concat(V));case 19:se=Ee.sent,q=se.result&&se.result.sequence;case 21:return ne=new v.default(J),be=new v.default(X),le={sender:re,id:"".concat(re.toString("hex"),"-").concat(q+1).toUpperCase(),symbol:Q,ordertype:2,side:Z,price:parseFloat(ne.mul(s).toString()),quantity:parseFloat(be.mul(s).toString()),timeinforce:te,aminoPrefix:N.AminoPrefix.NewOrderMsg},fe={id:le.id,ordertype:le.ordertype,price:le.price,quantity:le.quantity,sender:V,side:le.side,symbol:le.symbol,timeinforce:te},(0,H.checkNumber)(le.price,"price"),(0,H.checkNumber)(le.quantity,"quantity"),Ee.next=29,this._prepareTransaction(le,fe,V,q,"");case 29:return ce=Ee.sent,Ee.abrupt("return",this._broadcastDelegate(ce));case 31:case"end":return Ee.stop()}},z,this)}));function U(){return M.apply(this,arguments)}return U}()},{key:"list",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q,Z,J,X){var q,te,re,se,ne,be,le=arguments;return a.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:if(q=le.length>5&&le[5]!==void 0?le[5]:null,te=m.decodeAddress(V),V){ce.next=4;break}throw new Error("address should not be falsy");case 4:if(!(Q<=0)){ce.next=6;break}throw new Error("proposal id should larger than 0");case 6:if(!(X<=0)){ce.next=8;break}throw new Error("price should larger than 0");case 8:if(Z){ce.next=10;break}throw new Error("baseAsset should not be falsy");case 10:if(J){ce.next=12;break}throw new Error("quoteAsset should not be falsy");case 12:return re=Number(new v.default(X).mul(s).toString()),se={from:te,proposal_id:Q,base_asset_symbol:Z,quote_asset_symbol:J,init_price:re,aminoPrefix:N.AminoPrefix.ListMsg},ne={base_asset_symbol:Z,from:V,init_price:re,proposal_id:Q,quote_asset_symbol:J},ce.next=17,this._prepareTransaction(se,ne,V,q,"");case 17:return be=ce.sent,ce.abrupt("return",this._broadcastDelegate(be));case 19:case"end":return ce.stop()}},z,this)}));function U(z,V,Q,Z,J){return M.apply(this,arguments)}return U}()},{key:"listMiniToken",value:function(){var M=(0,c.default)(a.default.mark(function z(V){var Q,Z,J,X,q,te,re,se,ne;return a.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(Q=V.from,Z=V.baseAsset,J=V.quoteAsset,X=V.initPrice,q=V.sequence,te=q===void 0?null:q,(0,O.validateMiniTokenSymbol)(Z),!(X<=0)){le.next=4;break}throw new Error("price should larger than 0");case 4:if(Q){le.next=6;break}throw new Error("address should not be falsy");case 6:if(J){le.next=8;break}throw new Error("quoteAsset should not be falsy");case 8:return re=Number(new v.default(X).mul(s).toString()),se=new N.ListMiniMsg({from:Q,base_asset_symbol:Z,quote_asset_symbol:J,init_price:re}),le.next=12,this._prepareTransaction(se.getMsg(),se.getSignMsg(),Q,te);case 12:return ne=le.sent,le.abrupt("return",this._broadcastDelegate(ne));case 14:case"end":return le.stop()}},z,this)}));function U(z){return M.apply(this,arguments)}return U}()},{key:"setAccountFlags",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q){var Z,J,X,q,te,re=arguments;return a.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return Z=re.length>2&&re[2]!==void 0?re[2]:null,J=m.decodeAddress(V),X={from:J,flags:Q,aminoPrefix:N.AminoPrefix.SetAccountFlagsMsg},q={flags:Q,from:V},ne.next=6,this._prepareTransaction(X,q,V,Z,"");case 6:return te=ne.sent,ne.abrupt("return",this._broadcastDelegate(te));case 8:case"end":return ne.stop()}},z,this)}));function U(z,V){return M.apply(this,arguments)}return U}()},{key:"_prepareTransaction",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q,Z){var J,X,q,te,re=arguments;return a.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(J=re.length>3&&re[3]!==void 0?re[3]:null,X=re.length>4&&re[4]!==void 0?re[4]:"",!((!this.account_number||J!==0&&!J)&&Z)){ne.next=10;break}return ne.next=5,this._httpClient.request("get","".concat(l.getAccount,"/").concat(Z));case 5:q=ne.sent,J=q.result.sequence,this.account_number=q.result.account_number,ne.next=13;break;case 10:if(!this._setPkPromise){ne.next=13;break}return ne.next=13,this._setPkPromise;case 13:return te=new b.default({accountNumber:typeof this.account_number!="number"?parseInt(this.account_number):this.account_number,chainId:this.chainId,memo:X,msg:V,sequence:typeof J!="number"?parseInt(J):J,source:this._source}),ne.abrupt("return",this._signingDelegate.call(this,te,Q));case 15:case"end":return ne.stop()}},z,this)}));function U(z,V,Q){return M.apply(this,arguments)}return U}()},{key:"sendTransaction",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q){var Z;return a.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return Z=V.serialize(),X.abrupt("return",this.sendRawTransaction(Z,Q));case 2:case"end":return X.stop()}},z,this)}));function U(z,V){return M.apply(this,arguments)}return U}()},{key:"sendRawTransaction",value:function(){var M=(0,c.default)(a.default.mark(function z(V){var Q,Z,J=arguments;return a.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return Q=J.length>1&&J[1]!==void 0?J[1]:!this._useAsyncBroadcast,Z={data:V,headers:{"content-type":"text/plain"}},q.abrupt("return",this._httpClient.request("post","".concat(l.broadcast,"?sync=").concat(Q),null,Z));case 3:case"end":return q.stop()}},z,this)}));function U(z){return M.apply(this,arguments)}return U}()},{key:"_sendTransaction",value:function(){var M=(0,c.default)(a.default.mark(function z(V,Q,Z){var J,X,q,te,re=arguments;return a.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return J=re.length>3&&re[3]!==void 0?re[3]:null,X=re.length>4&&re[4]!==void 0?re[4]:"",q=re.length>5&&re[5]!==void 0?re[5]:!this._useAsyncBroadcast,ne.next=5,this._prepareTransaction(V,Q,Z,J,X);case 5:return te=ne.sent,ne.abrupt("return",this.sendTransaction(te,q));case 7:case"end":return ne.stop()}},z,this)}));function U(z,V,Q){return M.apply(this,arguments)}return U}()},{key:"getAccount",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z=arguments;return a.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:if(V=Z.length>0&&Z[0]!==void 0?Z[0]:this.address,V){X.next=3;break}throw new Error("address should not be falsy");case 3:return X.prev=3,X.next=6,this._httpClient.request("get","".concat(l.getAccount,"/").concat(V));case 6:return Q=X.sent,X.abrupt("return",Q);case 10:return X.prev=10,X.t0=X.catch(3),X.abrupt("return",null);case 13:case"end":return X.stop()}},z,this,[[3,10]])}));function U(){return M.apply(this,arguments)}return U}()},{key:"getBalance",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z=arguments;return a.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return V=Z.length>0&&Z[0]!==void 0?Z[0]:this.address,X.prev=1,X.next=4,this.getAccount(V);case 4:return Q=X.sent,X.abrupt("return",Q.result.balances);case 8:return X.prev=8,X.t0=X.catch(1),X.abrupt("return",[]);case 11:case"end":return X.stop()}},z,this,[[1,8]])}));function U(){return M.apply(this,arguments)}return U}()},{key:"getMarkets",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z,J=arguments;return a.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return V=J.length>0&&J[0]!==void 0?J[0]:1e3,Q=J.length>1&&J[1]!==void 0?J[1]:0,q.prev=2,q.next=5,this._httpClient.request("get","".concat(l.getMarkets,"?limit=").concat(V,"&offset=").concat(Q));case 5:return Z=q.sent,q.abrupt("return",Z);case 9:return q.prev=9,q.t0=q.catch(2),console.warn("getMarkets error",q.t0),q.abrupt("return",[]);case 13:case"end":return q.stop()}},z,this,[[2,9]])}));function U(){return M.apply(this,arguments)}return U}()},{key:"getTransactions",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z,J=arguments;return a.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return V=J.length>0&&J[0]!==void 0?J[0]:this.address,Q=J.length>1&&J[1]!==void 0?J[1]:0,q.prev=2,q.next=5,this._httpClient.request("get","".concat(l.getTransactions,"?address=").concat(V,"&offset=").concat(Q));case 5:return Z=q.sent,q.abrupt("return",Z);case 9:return q.prev=9,q.t0=q.catch(2),console.warn("getTransactions error",q.t0),q.abrupt("return",[]);case 13:case"end":return q.stop()}},z,this,[[2,9]])}));function U(){return M.apply(this,arguments)}return U}()},{key:"getTxs",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z,J,X=arguments;return a.default.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return V=X.length>0&&X[0]!==void 0?X[0]:this.address,Q=X.length>1?X[1]:void 0,Z=X.length>2?X[2]:void 0,te.prev=3,te.next=6,this._httpClient.request("get","".concat(l.getTxs,"?address=").concat(V,"&startTime=").concat(Q,"&endTime=").concat(Z));case 6:return J=te.sent,te.abrupt("return",J);case 10:return te.prev=10,te.t0=te.catch(3),console.warn("getTxs error",te.t0),te.abrupt("return",[]);case 14:case"end":return te.stop()}},z,this,[[3,10]])}));function U(){return M.apply(this,arguments)}return U}()},{key:"getTx",value:function(){var M=(0,c.default)(a.default.mark(function z(V){var Q;return a.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.prev=0,J.next=3,this._httpClient.request("get","".concat(l.getTx,"/").concat(V));case 3:return Q=J.sent,J.abrupt("return",Q);case 7:return J.prev=7,J.t0=J.catch(0),console.warn("getTx error",J.t0),J.abrupt("return",[]);case 11:case"end":return J.stop()}},z,this,[[0,7]])}));function U(z){return M.apply(this,arguments)}return U}()},{key:"getDepth",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z=arguments;return a.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return V=Z.length>0&&Z[0]!==void 0?Z[0]:"BNB_BUSD-BD1",X.prev=1,X.next=4,this._httpClient.request("get","".concat(l.getDepth,"?symbol=").concat(V));case 4:return Q=X.sent,X.abrupt("return",Q);case 8:return X.prev=8,X.t0=X.catch(1),console.warn("getDepth error",X.t0),X.abrupt("return",[]);case 12:case"end":return X.stop()}},z,this,[[1,8]])}));function U(){return M.apply(this,arguments)}return U}()},{key:"getOpenOrders",value:function(){var M=(0,c.default)(a.default.mark(function z(){var V,Q,Z=arguments;return a.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return V=Z.length>0&&Z[0]!==void 0?Z[0]:this.address,X.prev=1,X.next=4,this._httpClient.request("get","".concat(l.getOpenOrders,"?address=").concat(V));case 4:return Q=X.sent,X.abrupt("return",Q);case 8:return X.prev=8,X.t0=X.catch(1),console.warn("getOpenOrders error",X.t0),X.abrupt("return",[]);case 12:case"end":return X.stop()}},z,this,[[1,8]])}));function U(){return M.apply(this,arguments)}return U}()},{key:"getSwapByID",value:function(){var M=(0,c.default)(a.default.mark(function z(V){var Q;return a.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.prev=0,J.next=3,this._httpClient.request("get","".concat(l.getSwaps,"/").concat(V));case 3:return Q=J.sent,J.abrupt("return",Q);case 7:return J.prev=7,J.t0=J.catch(0),console.warn("query swap by swapID error",J.t0),J.abrupt("return",[]);case 11:case"end":return J.stop()}},z,this,[[0,7]])}));function U(z){return M.apply(this,arguments)}return U}()},{key:"getSwapByCreator",value:function(){var M=(0,c.default)(a.default.mark(function z(V){var Q,Z,J,X=arguments;return a.default.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return Q=X.length>1&&X[1]!==void 0?X[1]:100,Z=X.length>2&&X[2]!==void 0?X[2]:0,te.prev=2,te.next=5,this._httpClient.request("get","".concat(l.getSwaps,"?fromAddress=").concat(V,"&limit=").concat(Q,"&offset=").concat(Z));case 5:return J=te.sent,te.abrupt("return",J);case 9:return te.prev=9,te.t0=te.catch(2),console.warn("query swap list by swap creator error",te.t0),te.abrupt("return",[]);case 13:case"end":return te.stop()}},z,this,[[2,9]])}));function U(z){return M.apply(this,arguments)}return U}()},{key:"getSwapByRecipient",value:function(){var M=(0,c.default)(a.default.mark(function z(V){var Q,Z,J,X=arguments;return a.default.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return Q=X.length>1&&X[1]!==void 0?X[1]:100,Z=X.length>2&&X[2]!==void 0?X[2]:0,te.prev=2,te.next=5,this._httpClient.request("get","".concat(l.getSwaps,"?toAddress=").concat(V,"&limit=").concat(Q,"&offset=").concat(Z));case 5:return J=te.sent,te.abrupt("return",J);case 9:return te.prev=9,te.t0=te.catch(2),console.warn("query swap list by swap recipient error",te.t0),te.abrupt("return",[]);case 13:case"end":return te.stop()}},z,this,[[2,9]])}));function U(z){return M.apply(this,arguments)}return U}()},{key:"createAccount",value:function(){var U=m.generatePrivateKey();return{privateKey:U,address:m.getAddressFromPrivateKey(U,this.addressPrefix)}}},{key:"createAccountWithKeystore",value:function(U){if(!U)throw new Error("password should not be falsy");var z=m.generatePrivateKey(),V=m.getAddressFromPrivateKey(z,this.addressPrefix),Q=m.generateKeyStore(z,U);return{privateKey:z,address:V,keystore:Q}}},{key:"createAccountWithMneomnic",value:function(){var U=m.generateMnemonic(),z=m.getPrivateKeyFromMnemonic(U),V=m.getAddressFromPrivateKey(z,this.addressPrefix);return{privateKey:z,address:V,mnemonic:U}}},{key:"recoverAccountFromKeystore",value:function(U,z){var V=m.getPrivateKeyFromKeyStore(U,z),Q=m.getAddressFromPrivateKey(V,this.addressPrefix);return{privateKey:V,address:Q}}},{key:"recoverAccountFromMnemonic",value:function(U){var z=m.getPrivateKeyFromMnemonic(U),V=m.getAddressFromPrivateKey(z,this.addressPrefix);return{privateKey:z,address:V}}},{key:"recoverAccountFromMneomnic",value:function(U){return this.recoverAccountFromMnemonic(U)}},{key:"recoverAccountFromPrivateKey",value:function(U){var z=m.getAddressFromPrivateKey(U,this.addressPrefix);return{privateKey:U,address:z}}},{key:"checkAddress",value:function(U){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.addressPrefix;return m.checkAddress(U,z)}},{key:"getClientKeyAddress",value:function(){if(!this._privateKey)throw new Error("no private key is set on this client");var U=m.getAddressFromPrivateKey(this._privateKey,this.addressPrefix);return this.address=U,U}}]),k}();f.BncClient=A},92636:function(G,f,e){"use strict";var p=e(75263),r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.Stake=void 0;var u=r(e(64687)),i=r(e(17156)),g=r(e(56690)),a=r(e(89728)),c=r(e(38416)),v=r(e(93302)),m=p(e(23898)),b=e(54684),N=function(){function D(H){(0,g.default)(this,D),(0,c.default)(this,"_bncClient",void 0),this._bncClient=H}return(0,a.default)(D,[{key:"bscDelegate",value:function(){var H=(0,i.default)(u.default.mark(function w(O){var S,L,I,T,s,l,h,E;return u.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(S=O.delegateAddress,L=O.validatorAddress,I=O.amount,T=O.symbol,s=T===void 0?"BNB":T,l=O.sideChainId,h=l===void 0?"chapel":l,I){F.next=3;break}throw new Error("amount should not be empty");case 3:if(S){F.next=5;break}throw new Error("delegate address should not be null");case 5:if(m.checkAddress(L,"bva")){F.next=7;break}throw new Error("validator address is not valid");case 7:return I=Number(new v.default(I).mul(Math.pow(10,8)).toString()),E=new b.BscDelegateMsg({delegator_addr:S,validator_addr:L,delegation:{denom:s,amount:I},side_chain_id:h}),F.next=11,this.broadcast(E,S);case 11:return F.abrupt("return",F.sent);case 12:case"end":return F.stop()}},w,this)}));function x(w){return H.apply(this,arguments)}return x}()},{key:"bscUndelegate",value:function(){var H=(0,i.default)(u.default.mark(function w(O){var S,L,I,T,s,l,h,E;return u.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(S=O.delegateAddress,L=O.validatorAddress,I=O.amount,T=O.symbol,s=T===void 0?"BNB":T,l=O.sideChainId,h=l===void 0?"chapel":l,I){F.next=3;break}throw new Error("amount should not be empty");case 3:if(S){F.next=5;break}throw new Error("delegate address should not be null");case 5:if(m.checkAddress(L,"bva")){F.next=7;break}throw new Error("validator address is not valid");case 7:return I=Number(new v.default(I).mul(Math.pow(10,8)).toString()),E=new b.BscUndelegateMsg({delegator_addr:S,validator_addr:L,amount:{denom:s,amount:I},side_chain_id:h}),F.next=11,this.broadcast(E,S);case 11:return F.abrupt("return",F.sent);case 12:case"end":return F.stop()}},w,this)}));function x(w){return H.apply(this,arguments)}return x}()},{key:"bscReDelegate",value:function(){var H=(0,i.default)(u.default.mark(function w(O){var S,L,I,T,s,l,h,E,j;return u.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(S=O.delegateAddress,L=O.validatorSrcAddress,I=O.validatorDstAddress,T=O.amount,s=O.symbol,l=s===void 0?"BNB":s,h=O.sideChainId,E=h===void 0?"chapel":h,T){W.next=3;break}throw new Error("amount should not be empty");case 3:if(S){W.next=5;break}throw new Error("delegate address should not be null");case 5:if(m.checkAddress(L,"bva")){W.next=7;break}throw new Error("validator source address is not valid");case 7:if(m.checkAddress(I,"bva")){W.next=9;break}throw new Error("validator dest address is not valid");case 9:return T=Number(new v.default(T).mul(Math.pow(10,8)).toString()),j=new b.BscReDelegateMsg({delegator_addr:S,validator_src_addr:L,validator_dst_addr:I,amount:{denom:l,amount:T},side_chain_id:E}),W.next=13,this.broadcast(j,S);case 13:return W.abrupt("return",W.sent);case 14:case"end":return W.stop()}},w,this)}));function x(w){return H.apply(this,arguments)}return x}()},{key:"broadcast",value:function(){var H=(0,i.default)(u.default.mark(function w(O,S,L){var I;return u.default.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,this._bncClient._prepareTransaction(O.getMsg(),O.getSignMsg(),S,L);case 2:return I=s.sent,s.abrupt("return",this._bncClient._broadcastDelegate(I));case 4:case"end":return s.stop()}},w,this)}));function x(w,O,S){return H.apply(this,arguments)}return x}()}]),D}();f.Stake=N},18620:function(G,f,e){"use strict";var p=e(75263),r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var u=r(e(64687)),i=r(e(17156)),g=r(e(56690)),a=r(e(89728)),c=r(e(38416)),v=e(48764),m=p(e(23898)),b=e(54684),N=e(72731),D=function(){function x(w){return(0,g.default)(this,x),(0,c.default)(this,"_bncClient",void 0),x.instance||(this._bncClient=w,x.instance=this),x.instance}return(0,a.default)(x,[{key:"HTLT",value:function(){var w=(0,i.default)(u.default.mark(function S(L,I,T,s,l,h,E,j,F,W){var d,A,k;return u.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return(0,N.checkCoins)(E),d={from:m.decodeAddress(L),to:m.decodeAddress(I),recipient_other_chain:T,sender_other_chain:s,random_number_hash:v.Buffer.from(l,"hex"),timestamp:h,amount:E,expected_income:j,height_span:F,cross_chain:W,aminoPrefix:b.AminoPrefix.HTLTMsg},A={from:L,to:I,recipient_other_chain:T,sender_other_chain:s,random_number_hash:l,timestamp:h,amount:E,expected_income:j,height_span:F,cross_chain:W},U.next=5,this._bncClient._prepareTransaction(d,A,L);case 5:return k=U.sent,U.abrupt("return",this._bncClient._broadcastDelegate(k));case 7:case"end":return U.stop()}},S,this)}));function O(S,L,I,T,s,l,h,E,j,F){return w.apply(this,arguments)}return O}()},{key:"depositHTLT",value:function(){var w=(0,i.default)(u.default.mark(function S(L,I,T){var s,l,h;return u.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return(0,N.checkCoins)(T),s={from:m.decodeAddress(L),amount:T,swap_id:v.Buffer.from(I,"hex"),aminoPrefix:b.AminoPrefix.DepositHTLTMsg},l={from:L,amount:T,swap_id:I},j.next=5,this._bncClient._prepareTransaction(s,l,L);case 5:return h=j.sent,j.abrupt("return",this._bncClient._broadcastDelegate(h));case 7:case"end":return j.stop()}},S,this)}));function O(S,L,I){return w.apply(this,arguments)}return O}()},{key:"claimHTLT",value:function(){var w=(0,i.default)(u.default.mark(function S(L,I,T){var s,l,h;return u.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return s={from:m.decodeAddress(L),swap_id:v.Buffer.from(I,"hex"),random_number:v.Buffer.from(T,"hex"),aminoPrefix:b.AminoPrefix.ClaimHTLTMsg},l={from:L,swap_id:I,random_number:T},j.next=4,this._bncClient._prepareTransaction(s,l,L);case 4:return h=j.sent,j.abrupt("return",this._bncClient._broadcastDelegate(h));case 6:case"end":return j.stop()}},S,this)}));function O(S,L,I){return w.apply(this,arguments)}return O}()},{key:"refundHTLT",value:function(){var w=(0,i.default)(u.default.mark(function S(L,I){var T,s,l;return u.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return T={from:m.decodeAddress(L),swap_id:v.Buffer.from(I,"hex"),aminoPrefix:b.AminoPrefix.RefundHTLTMsg},s={from:L,swap_id:I},E.next=4,this._bncClient._prepareTransaction(T,s,L);case 4:return l=E.sent,E.abrupt("return",this._bncClient._broadcastDelegate(l));case 6:case"end":return E.stop()}},S,this)}));function O(S,L){return w.apply(this,arguments)}return O}()}]),x}();(0,c.default)(D,"instance",void 0);var H=D;f.default=H},15683:function(G,f,e){"use strict";var p=e(75263),r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=f.validateMiniTokenSymbol=void 0;var u=r(e(56690)),i=r(e(89728)),g=r(e(38416)),a=r(e(64687)),c=r(e(17156)),v=r(e(93302)),m=e(86052),b=p(e(23898)),N=e(54684),D=e(72731),H=9e18,x=1e6,w=1e4,O=function(){var T=(0,c.default)(a.default.mark(function s(l,h,E,j){var F,W,d,A,k,M=arguments;return a.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(F=M.length>4&&M[4]!==void 0?M[4]:"free",W=new v.default(l),!(W.lte(0)||W.gt(H))){z.next=4;break}throw new Error("invalid amount");case 4:return z.prev=4,z.next=7,j.request("get","".concat(m.api.getAccount,"/").concat(E));case 7:if(d=z.sent,A=d.result,k=A.balances.find(function(V){return V.symbol.toUpperCase()===h.toUpperCase()}),k){z.next=12;break}throw new Error("the account doesn't have ".concat(h));case 12:if(!W.gte(k[F])){z.next=14;break}throw new Error("the account doesn't have enougth balance");case 14:z.next=18;break;case 16:z.prev=16,z.t0=z.catch(4);case 18:case"end":return z.stop()}},s,null,[[4,16]])}));return function(l,h,E,j){return T.apply(this,arguments)}}(),S=function(s){if(!s)throw new Error("suffixed token symbol cannot be empty");var l=s.split("-");if(l.length!=2)throw new Error("suffixed mini-token symbol must contain a hyphen ('-')");if(!l[1])throw new Error('suffixed mini-token symbol must contain just one hyphen (" - ")');if(!/^[a-zA-z\d]{3,8}$/.test(l[0]))throw new Error("symbol should be alphanumeric and length is limited to 3~8");if(!l[1].endsWith("M"))throw new Error("mini-token symbol suffix must end with M")};f.validateMiniTokenSymbol=S;var L=function(){function T(s){(0,u.default)(this,T),(0,g.default)(this,"_bncClient",void 0),this._bncClient=s}return(0,i.default)(T,[{key:"issue",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F){var W,d,A,k,M,U=arguments;return a.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(W=U.length>3&&U[3]!==void 0?U[3]:0,d=U.length>4&&U[4]!==void 0?U[4]:!1,E){V.next=4;break}throw new Error("sender address cannot be empty");case 4:if(!(j.length>32)){V.next=6;break}throw new Error("token name is limited to 32 characters");case 6:if(/^[a-zA-z\d]{3,8}$/.test(F)){V.next=8;break}throw new Error("symbol should be alphanumeric and length is limited to 3~8");case 8:if(!(W<=0||W>H)){V.next=10;break}throw new Error("invalid supply amount");case 10:return W=Number(new v.default(W).mul(Math.pow(10,8)).toString()),A={from:b.decodeAddress(E),name:j,symbol:F,total_supply:W,mintable:d,aminoPrefix:N.AminoPrefix.IssueMsg},k={from:E,name:j,symbol:F,total_supply:W,mintable:d},V.next=15,this._bncClient._prepareTransaction(A,k,E);case 15:return M=V.sent,V.abrupt("return",this._bncClient._broadcastDelegate(M));case 17:case"end":return V.stop()}},h,this)}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"issueMiniToken",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F){var W,d,A,k,M,U=arguments;return a.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(W=U.length>3&&U[3]!==void 0?U[3]:0,d=U.length>4&&U[4]!==void 0?U[4]:!1,A=U.length>5?U[5]:void 0,E){V.next=5;break}throw new Error("sender address cannot be empty");case 5:if(!(j.length>32)){V.next=7;break}throw new Error("token name is limited to 32 characters");case 7:if(/^[a-zA-z\d]{3,8}$/.test(F)){V.next=9;break}throw new Error("symbol should be alphanumeric and length is limited to 3~8");case 9:if(!(W<=0||W>x)){V.next=11;break}throw new Error("invalid supply amount");case 11:return W=Number(new v.default(W).mul(Math.pow(10,8)).toString()),k=new N.IssueMiniTokenMsg({name:j,symbol:F,total_supply:W,mintable:d,token_uri:A,from:E}),V.next=15,this._bncClient._prepareTransaction(k.getMsg(),k.getSignMsg(),E);case 15:return M=V.sent,V.abrupt("return",this._bncClient._broadcastDelegate(M));case 17:case"end":return V.stop()}},h,this)}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"issueTinyToken",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F){var W,d,A,k,M,U=arguments;return a.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(W=U.length>3&&U[3]!==void 0?U[3]:0,d=U.length>4&&U[4]!==void 0?U[4]:!1,A=U.length>5?U[5]:void 0,E){V.next=5;break}throw new Error("sender address cannot be empty");case 5:if(!(j.length>32)){V.next=7;break}throw new Error("token name is limited to 32 characters");case 7:if(/^[a-zA-z\d]{3,8}$/.test(F)){V.next=9;break}throw new Error("symbol should be alphanumeric and length is limited to 3~8");case 9:if(!(W<=0||W>w)){V.next=11;break}throw new Error("invalid supply amount");case 11:return W=Number(new v.default(W).mul(Math.pow(10,8)).toString()),k=new N.IssueTinyTokenMsg({name:j,symbol:F,total_supply:W,mintable:d,token_uri:A,from:E}),V.next=15,this._bncClient._prepareTransaction(k.getMsg(),k.getSignMsg(),E);case 15:return M=V.sent,V.abrupt("return",this._bncClient._broadcastDelegate(M));case 17:case"end":return V.stop()}},h,this)}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"setTokenUri",value:function(){var s=(0,c.default)(a.default.mark(function h(E){var j,F,W,d,A;return a.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(j=E.fromAddress,F=E.tokenUri,W=E.symbol,S(W),!(F.length>2048)){M.next=4;break}throw new Error("uri cannot be longer than 2048 characters");case 4:if(j){M.next=6;break}throw new Error("address cannot be empty");case 6:return d=new N.SetTokenUriMsg({from:j,token_uri:F,symbol:W}),M.next=9,this._bncClient._prepareTransaction(d.getMsg(),d.getSignMsg(),j);case 9:return A=M.sent,M.abrupt("return",this._bncClient._broadcastDelegate(A));case 11:case"end":return M.stop()}},h,this)}));function l(h){return s.apply(this,arguments)}return l}()},{key:"freeze",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F){var W,d,A;return a.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return(0,D.validateSymbol)(j),O(F,j,E,this._bncClient._httpClient,"free"),F=+Number(new v.default(F).mul(Math.pow(10,8)).toString()),W={from:b.decodeAddress(E),symbol:j,amount:F,aminoPrefix:N.AminoPrefix.FreezeMsg},d={amount:F,from:E,symbol:j},M.next=7,this._bncClient._prepareTransaction(W,d,E);case 7:return A=M.sent,M.abrupt("return",this._bncClient._broadcastDelegate(A));case 9:case"end":return M.stop()}},h,this)}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"unfreeze",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F){var W,d,A;return a.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return(0,D.validateSymbol)(j),O(F,j,E,this._bncClient._httpClient,"frozen"),F=+Number(new v.default(F).mul(Math.pow(10,8)).toString()),W={from:b.decodeAddress(E),symbol:j,amount:F,aminoPrefix:N.AminoPrefix.UnfreezeMsg},d={amount:F,from:E,symbol:j},M.next=7,this._bncClient._prepareTransaction(W,d,E);case 7:return A=M.sent,M.abrupt("return",this._bncClient._broadcastDelegate(A));case 9:case"end":return M.stop()}},h,this)}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"burn",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F){var W,d,A;return a.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return(0,D.validateSymbol)(j),O(F,j,E,this._bncClient._httpClient),F=+Number(new v.default(F).mul(Math.pow(10,8)).toString()),W={from:b.decodeAddress(E),symbol:j,amount:F,aminoPrefix:N.AminoPrefix.BurnMsg},d={amount:F,from:E,symbol:j},M.next=7,this._bncClient._prepareTransaction(W,d,E);case 7:return A=M.sent,M.abrupt("return",this._bncClient._broadcastDelegate(A));case 9:case"end":return M.stop()}},h,this)}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"mint",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F){var W,d,A;return a.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if((0,D.validateSymbol)(j),!(F<=0||F>H)){M.next=3;break}throw new Error("invalid amount");case 3:return F=Number(new v.default(F).mul(Math.pow(10,8)).toString()),W={from:b.decodeAddress(E),symbol:j,amount:F,aminoPrefix:N.AminoPrefix.MintMsg},d={amount:F,from:E,symbol:j},M.next=8,this._bncClient._prepareTransaction(W,d,E);case 8:return A=M.sent,M.abrupt("return",this._bncClient._broadcastDelegate(A));case 10:case"end":return M.stop()}},h,this)}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"timeLock",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F,W){var d,A,k;return a.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if((0,D.checkCoins)(F),!(j.length>128)){U.next=3;break}throw new Error("description is too long");case 3:if(!(W<60||W>253402300800)){U.next=5;break}throw new Error("timeTime must be in [60, 253402300800]");case 5:return d={from:b.decodeAddress(E),description:j,amount:F,lock_time:W,aminoPrefix:N.AminoPrefix.TimeLockMsg},A={from:E,description:j,amount:F,lock_time:W},U.next=9,this._bncClient._prepareTransaction(d,A,E);case 9:return k=U.sent,U.abrupt("return",this._bncClient._broadcastDelegate(k));case 11:case"end":return U.stop()}},h,this)}));function l(h,E,j,F){return s.apply(this,arguments)}return l}()},{key:"timeRelock",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j,F,W,d){var A,k,M;return a.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if((0,D.checkCoins)(W),!(F.length>128)){z.next=3;break}throw new Error("description is too long");case 3:if(!(d<60||d>253402300800)){z.next=5;break}throw new Error("timeTime must be in [60, 253402300800]");case 5:return A={from:b.decodeAddress(E),time_lock_id:j,description:F,amount:W,lock_time:d,aminoPrefix:N.AminoPrefix.TimeRelockMsg},k={from:E,time_lock_id:j,description:F,amount:W,lock_time:d},z.next=9,this._bncClient._prepareTransaction(A,k,E);case 9:return M=z.sent,z.abrupt("return",this._bncClient._broadcastDelegate(M));case 11:case"end":return z.stop()}},h,this)}));function l(h,E,j,F,W){return s.apply(this,arguments)}return l}()},{key:"timeUnlock",value:function(){var s=(0,c.default)(a.default.mark(function h(E,j){var F,W,d;return a.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return F={from:b.decodeAddress(E),time_lock_id:j,aminoPrefix:N.AminoPrefix.TimeUnlockMsg},W={from:E,time_lock_id:j},k.next=4,this._bncClient._prepareTransaction(F,W,E);case 4:return d=k.sent,k.abrupt("return",this._bncClient._broadcastDelegate(d));case 6:case"end":return k.stop()}},h,this)}));function l(h,E){return s.apply(this,arguments)}return l}()}]),T}(),I=L;f.default=I},23898:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.getPrivateKeyFromMnemonic=f.validateMnemonic=f.generateMnemonic=f.getPrivateKeyFromKeyStore=f.generateKeyStore=f.verifySignature=f.generateSignature=f.getAddressFromPrivateKey=f.getAddressFromPublicKey=f.generatePubKey=f.getPublicKeyFromPrivateKey=f.getPublicKey=f.generateRandomArray=f.generatePrivateKey=f.encodeAddress=f.checkAddress=f.decodeAddress=void 0;var i=u(e(92882)),g=r(e(37786)),a=r(e(2153)),c=u(e(55835)),v=e(86266),m=u(e(94315)),b=u(e(80064)),N=u(e(95892)),D=u(e(55877)),H=e(20723),x=32,w=256,O=20,S="secp256k1",L="44'/714'/0'/0/",I=new v.ec(S),T=function(X){var q=i.default.decode(X);return p.from(i.default.fromWords(q.words))};f.decodeAddress=T;var s=function(X,q){try{if(!X.startsWith(q))return!1;var te=i.default.decode(X),re=T(X).length;return re===O&&te.prefix===q}catch{return!1}};f.checkAddress=s;var l=function(X){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"tbnb",te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"hex",re;return p.isBuffer(X)?re=i.default.toWords(p.from(X)):re=i.default.toWords(p.from(X,te)),i.default.encode(q,re)};f.encodeAddress=l;var h=function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;return(0,H.ab2hexstring)((0,b.default)(X))};f.generatePrivateKey=h;var E=function(X){return(0,b.default)(X)};f.generateRandomArray=E;var j=function(X){var q=I.keyFromPublic(X,"hex");return q.getPublic()};f.getPublicKey=j;var F=function(X){if(!X||X.length!==x*2)throw new Error("invalid privateKey");var q=new v.ec(S),te=q.keyFromPrivate(X,"hex"),re=te.getPublic().encode("hex",!1);return re};f.getPublicKeyFromPrivateKey=F;var W=function(X){var q=new v.ec(S),te=q.keyFromPrivate(X);return te.getPublic()};f.generatePubKey=W;var d=function(X,q){var te=I.keyFromPublic(X,"hex"),re=te.getPublic(),se=re.encodeCompressed(),ne=(0,H.ab2hexstring)(se),be=(0,H.sha256ripemd160)(ne),le=l(be,q);return le};f.getAddressFromPublicKey=d;var A=function(X,q){return d(F(X),q)};f.getAddressFromPrivateKey=A;var k=function(X,q){var te=(0,H.sha256)(X),re=p.from(te,"hex"),se=N.default.sign(re,typeof q=="string"?p.from(q,"hex"):q);return se};f.generateSignature=k;var M=function(X,q,te){var re=p.from(te,"hex");if(!N.default.isPoint(re))throw new Error("Invalid public key provided");var se=(0,H.sha256)(q),ne=p.from(se,"hex");return N.default.verify(ne,re,p.from(X,"hex"))};f.verifySignature=M;var U=function(X,q){var te=c.default.randomBytes(32),re=c.default.randomBytes(16),se="aes-256-ctr",ne="pbkdf2",be={dklen:32,salt:te.toString("hex"),c:262144,prf:"hmac-sha256"},le=c.default.pbkdf2Sync(p.from(q),te,be.c,be.dklen,"sha256"),fe=c.default.createCipheriv(se,le.slice(0,32),re);if(!fe)throw new Error("Unsupported cipher");var ce=p.concat([fe.update(p.from(X,"hex")),fe.final()]),pe=p.concat([le.slice(16,32),ce]);return{version:1,id:D.default.v4({random:c.default.randomBytes(16)}),crypto:{ciphertext:ce.toString("hex"),cipherparams:{iv:re.toString("hex")},cipher:se,kdf:ne,kdfparams:be,mac:(0,H.sha3)(pe.toString("hex"))}}};f.generateKeyStore=U;var z=function(X,q){if(!m.default.string(q))throw new Error("No password given.");var te=m.default.object(X)?X:JSON.parse(X),re=te.crypto.kdfparams;if(re.prf!=="hmac-sha256")throw new Error("Unsupported parameters to PBKDF2");var se=c.default.pbkdf2Sync(p.from(q),p.from(re.salt,"hex"),re.c,re.dklen,"sha256"),ne=p.from(te.crypto.ciphertext,"hex"),be=p.concat([se.slice(16,32),ne]),le=(0,H.sha3)(be.toString("hex"));if(le!==te.crypto.mac){var fe=(0,H.sha256)(be.toString("hex"));if(fe!==te.crypto.mac)throw new Error("Keystore mac check failed (sha3 & sha256) - wrong password?")}var ce=c.default.createDecipheriv(te.crypto.cipher,se.slice(0,32),p.from(te.crypto.cipherparams.iv,"hex")),pe=p.concat([ce.update(ne),ce.final()]).toString("hex");return pe};f.getPrivateKeyFromKeyStore=z;var V=function(){return a.generateMnemonic(w)};f.generateMnemonic=V;var Q=a.validateMnemonic;f.validateMnemonic=Q;var Z=function(X){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"";if(!a.validateMnemonic(X,a.wordlists.english)&&!a.validateMnemonic(X,a.wordlists.chinese_simplified)&&!a.validateMnemonic(X,a.wordlists.chinese_traditional)&&!a.validateMnemonic(X,a.wordlists.korean)&&!a.validateMnemonic(X,a.wordlists.french)&&!a.validateMnemonic(X,a.wordlists.italian)&&!a.validateMnemonic(X,a.wordlists.spanish)&&!a.validateMnemonic(X,a.wordlists.japanese))throw new Error("wrong mnemonic format");var se=a.mnemonicToSeedSync(X,re);if(q){var ne=g.fromSeed(se),be=ne.derivePath(L+te);if(!be.privateKey)throw new Error("child does not have a privateKey");return be.privateKey.toString("hex")}return se.toString("hex")};f.getPrivateKeyFromMnemonic=Z},66468:function(){"use strict"},58298:function(G,f,e){"use strict";var p,r=e(64836),u=e(75263);p={value:!0},Object.defineProperty(f,"TR",{enumerable:!0,get:function(){return g.BncClient}}),p={enumerable:!0,get:function(){return m.default}},p={enumerable:!0,get:function(){return b.default}},p={enumerable:!0,get:function(){return N.default}},p=p=f.eL=p=void 0,e(66468);var i=u(e(57255));p=i;var g=e(86052),a=u(e(23898));f.eL=a;var c=u(e(54684));p=c;var v=u(e(20723));p=v;var m=r(e(62099)),b=r(e(86333)),N=r(e(62455))},62099:function(G,f,e){"use strict";var p=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var r=p(e(81)),u="@ledgerhq/hw-transport-node-hid",i=typeof window<"u",g={app:r.default,LedgerApp:r.default,transports:{u2f:e(93298).Z,wble:e(68277).Z,node:!i&&c(u)?e(36048)(u).default:null}};G.exports=g;var a=g;f.default=a;function c(v){try{return e(36048).resolve(v)}catch{return!1}}},81:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var u=r(e(64687)),i=r(e(17156)),g=r(e(56690)),a=r(e(89728)),c=r(e(38416)),v=5e4,m=3e3,b=188,N="CSM",D=[36864],H=250,x=0,w=1,O=2,S=3,L=function(){function T(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;if((0,g.default)(this,T),(0,c.default)(this,"_transport",void 0),(0,c.default)(this,"_interactiveTimeout",void 0),(0,c.default)(this,"_nonInteractiveTimeout",void 0),!s||!s.send)throw new Error("LedgerApp expected a Transport");this._transport=s,this._interactiveTimeout=l,this._nonInteractiveTimeout=h,this._transport.setScrambleKey(N)}return(0,a.default)(T,[{key:"_serialize",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b,h=arguments.length>1?arguments[1]:void 0,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,W=5;if(F!=null){if(F.length>255)throw new Error("maximum data size = 255");W+=F.length}var d=p.alloc(W);return d[0]=l,d[1]=h,d[2]=E,d[3]=j,d[4]=0,F!=null&&(d[4]=F.length,d.set(F,5)),d}},{key:"_serializeHRP",value:function(l){if(l==null||l.length<3||l.length>83)throw new Error("Invalid HRP");var h=p.alloc(1+l.length);return h.writeUInt8(l.length,0),h.write(l,1),h}},{key:"_serializeHDPath",value:function(l){if(l==null||l.length<3)throw new Error("Invalid path.");if(l.length>10)throw new Error("Invalid path. Length should be <= 10");var h=p.alloc(1+4*l.length);h.writeUInt8(l.length,0);for(var E=0;E<l.length;E++){var j=l[E];E<3&&(j|=2147483648),h.writeInt32LE(j,1+E*4)}return h}},{key:"_errorMessage",value:function(l){switch(l){case 1:return"U2F: Unknown";case 2:return"U2F: Bad request";case 3:return"U2F: Configuration unsupported";case 4:return"U2F: Device Ineligible";case 5:return"U2F: Timeout";case 14:return"Timeout";case 36864:return"No errors";case 36865:return"Device is busy";case 25600:return"Execution Error";case 26368:return"Wrong Length";case 27010:return"Empty Buffer";case 27011:return"Output buffer too small";case 27012:return"Data is invalid";case 27013:return"Conditions not satisfied";case 27014:return"Transaction rejected";case 27264:return"Bad key handle";case 27392:return"Invalid P1/P2";case 27904:return"Instruction not supported";case 28160:return"The app does not seem to be open";case 28416:return"Unknown error";case 28417:return"Sign/verify error";default:return"Unknown error code"}}},{key:"getVersion",value:function(){var s=(0,i.default)(u.default.mark(function h(){var E,j,F,W,d,A,k;return u.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return E={},U.prev=1,this._transport.setExchangeTimeout(this._nonInteractiveTimeout),U.next=5,this._transport.send(b,x,0,0,p.alloc(0),D);case 5:if(j=U.sent,p.isBuffer(j)){U.next=8;break}throw new Error("expected apduResponse to be Buffer");case 8:F=j.slice(-2),E.test_mode=j[0]!==0,E.major=j[1],E.minor=j[2],E.patch=j[3],E.device_locked=j[4]===1,E.return_code=F[0]*256+F[1],E.error_message=this._errorMessage(E.return_code),U.next=23;break;case 18:throw U.prev=18,U.t0=U.catch(1),W=U.t0.statusCode,d=U.t0.statusText,A=U.t0.message,k=U.t0.stack,console.warn("Ledger getVersion error:",this._errorMessage(W),A,d,k),U.t0;case 23:return U.abrupt("return",E);case 24:case"end":return U.stop()}},h,this,[[1,18]])}));function l(){return s.apply(this,arguments)}return l}()},{key:"publicKeySecp256k1",value:function(){var s=(0,i.default)(u.default.mark(function h(){var E,j,F,W,d,A,k,M,U=arguments;return u.default.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return E=U.length>0&&U[0]!==void 0?U[0]:[44,714,0,0,0],j={},V.prev=2,this._transport.setExchangeTimeout(this._nonInteractiveTimeout),V.next=6,this._transport.send(b,w,0,0,this._serializeHDPath(E),D);case 6:if(F=V.sent,p.isBuffer(F)){V.next=9;break}throw new Error("expected apduResponse to be Buffer");case 9:W=F.slice(-2),j.pk=F.slice(0,65),j.return_code=W[0]*256+W[1],j.error_message=this._errorMessage(j.return_code),V.next=20;break;case 15:throw V.prev=15,V.t0=V.catch(2),d=V.t0.statusCode,A=V.t0.statusText,k=V.t0.message,M=V.t0.stack,console.warn("Ledger publicKeySecp256k1 error:",this._errorMessage(d),k,A,M),V.t0;case 20:return V.abrupt("return",j);case 21:case"end":return V.stop()}},h,this,[[2,15]])}));function l(){return s.apply(this,arguments)}return l}()},{key:"_signGetChunks",value:function(l,h){var E=[];E.push(this._serializeHDPath(h));for(var j=p.from(l),F=0;F<j.length;F+=H){var W=F+H;F>j.length&&(W=j.length),E.push(j.slice(F,W))}return E}},{key:"_signSendChunk",value:function(){var s=(0,i.default)(u.default.mark(function h(E,j,F){var W,d,A,k,M,U,z;return u.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return W={},Q.prev=1,Q.next=4,this._transport.send(b,O,E,j,F);case 4:if(d=Q.sent,p.isBuffer(d)){Q.next=7;break}throw new Error("expected apduResponse to be Buffer");case 7:A=d.slice(-2),W.return_code=A[0]*256+A[1],W.error_message=this._errorMessage(W.return_code),W.signature=null,d.length>2&&(W.signature=d.slice(0,d.length-2)),Q.next=19;break;case 14:throw Q.prev=14,Q.t0=Q.catch(1),k=Q.t0.statusCode,M=Q.t0.statusText,U=Q.t0.message,z=Q.t0.stack,console.warn("Ledger signSendChunk error:",this._errorMessage(k),U,M,z),Q.t0;case 19:return Q.abrupt("return",W);case 20:case"end":return Q.stop()}},h,this,[[1,14]])}));function l(h,E,j){return s.apply(this,arguments)}return l}()},{key:"signSecp256k1",value:function(){var s=(0,i.default)(u.default.mark(function h(E){var j,F,W,d,A,k,M,U,z,V,Q,Z,J,X,q,te,re,se,ne,be,le=arguments;return u.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return j=le.length>1&&le[1]!==void 0?le[1]:[44,714,0,0,0],F={},W=this._signGetChunks(E,j),ce.prev=3,W.length<=1?this._transport.setExchangeTimeout(this._interactiveTimeout):this._transport.setExchangeTimeout(this._nonInteractiveTimeout),ce.next=7,this._signSendChunk(1,W.length,W[0]);case 7:d=ce.sent,F.return_code=d.return_code,F.error_message=d.error_message,F.signature=null,ce.next=18;break;case 13:throw ce.prev=13,ce.t0=ce.catch(3),A=ce.t0.statusCode,k=ce.t0.statusText,M=ce.t0.message,U=ce.t0.stack,console.warn("Ledger signSecp256k1 error (chunk 1):",this._errorMessage(A),M,k,U),ce.t0;case 18:if(d.return_code!==36864){ce.next=60;break}z=1;case 20:if(!(z<W.length)){ce.next=40;break}return ce.prev=21,z===W.length-1&&this._transport.setExchangeTimeout(this._interactiveTimeout),ce.next=25,this._signSendChunk(1+z,W.length,W[z]);case 25:d=ce.sent,F.return_code=d.return_code,F.error_message=d.error_message,ce.next=35;break;case 30:throw ce.prev=30,ce.t1=ce.catch(21),V=ce.t1.statusCode,Q=ce.t1.statusText,Z=ce.t1.message,J=ce.t1.stack,console.warn("Ledger signSecp256k1 error (chunk 2):",this._errorMessage(V),Z,Q,J),ce.t1;case 35:if(d.return_code===36864){ce.next=37;break}return ce.abrupt("break",40);case 37:z++,ce.next=20;break;case 40:if(F.return_code=d.return_code,F.error_message=d.error_message,X=d.signature,!(!X||!X.length)){ce.next=45;break}throw new Error("Ledger assertion failed: Expected a non-empty signature from the device");case 45:if(X[0]===48){ce.next=47;break}throw new Error("Ledger assertion failed: Expected a signature header of 0x30");case 47:if(q=4,te=X[3],re=X[4+te+1],se=X.length-re,te===33&&(q++,te--),re===33&&se++,ne=X.slice(q,q+te),be=X.slice(se),X=F.signature=p.concat([ne,be]),X.length===64){ce.next=58;break}throw new Error("Ledger assertion failed: incorrect signature length ".concat(X.length));case 58:ce.next=61;break;case 60:throw new Error("Unable to sign the transaction. Return code "+d.return_code);case 61:return ce.abrupt("return",F);case 62:case"end":return ce.stop()}},h,this,[[3,13],[21,30]])}));function l(h){return s.apply(this,arguments)}return l}()},{key:"showAddress",value:function(){var s=(0,i.default)(u.default.mark(function h(){var E,j,F,W,d,A,k=arguments;return u.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return E=k.length>0&&k[0]!==void 0?k[0]:"bnb",j=k.length>1&&k[1]!==void 0?k[1]:[44,714,0,0,0],F={},W=p.concat([this._serializeHRP(E),this._serializeHDPath(j)]),this._transport.setExchangeTimeout(this._interactiveTimeout),U.next=7,this._transport.send(b,S,0,0,W,D);case 7:if(d=U.sent,p.isBuffer(d)){U.next=10;break}throw new Error("expected apduResponse to be Buffer");case 10:return A=d.slice(-2),F.return_code=A[0]*256+A[1],F.error_message=this._errorMessage(F.return_code),F.return_code===27264&&(F.error_message=d.slice(0,d.length-2).toString("ascii")),U.abrupt("return",F);case 15:case"end":return U.stop()}},h,this)}));function l(){return s.apply(this,arguments)}return l}()},{key:"getPublicKey",value:function(l){return this.publicKeySecp256k1(l)}},{key:"sign",value:function(l,h){return this.signSecp256k1(l,h)}}]),T}();G.exports=L;var I=L;f.default=I},49102:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var u=r(e(56690)),i=r(e(89728)),g=r(e(66115)),a=r(e(61655)),c=r(e(94993)),v=r(e(73808)),m=r(e(38416)),b=r(e(9669)),N=e(17187),D=r(e(94315)),H=r(e(53915)),x=r(e(4850)),w=r(e(8575)),O=r(e(81541));function S(j){var F=L();return function(){var d=(0,v.default)(j),A;if(F){var k=(0,v.default)(this).constructor;A=Reflect.construct(d,arguments,k)}else A=d.apply(this,arguments);return(0,c.default)(this,A)}}function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(j){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=[];for(var d in F)D.default.string(F[d])?W.push("".concat(d,'="').concat(F[d],'"')):p.isBuffer(F[d])?W.push("".concat(d,"=0x").concat(F[d].toString("hex"))):W.push("".concat(d,"=").concat(F[d]));return"".concat(j,"?").concat(W.join("&"))}function T(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var F in j){var W=j[F];typeof W=="number"?j[F]=String(W):p.isBuffer(W)?j[F]="0x"+W.toString("hex"):W instanceof Uint8Array&&(j[F]="0x"+p.from(W).toString("hex"))}return j}var s=["ws:","wss:"],l=["http:","https:"],h=s.concat(l),E=function(j){(0,a.default)(W,j);var F=S(W);function W(){var d,A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"localhost:27146";(0,u.default)(this,W),d=F.call(this),(0,m.default)((0,g.default)(d),"uri",void 0),(0,m.default)((0,g.default)(d),"call",void 0),(0,m.default)((0,g.default)(d),"closed",!1),(0,m.default)((0,g.default)(d),"ws",void 0),(0,m.default)((0,g.default)(d),"createCallBasedMethod",function(Q){return function(Z,J){return d.call(Q,Z,J).then(function(X){return X})}}),(0,m.default)((0,g.default)(d),"subscribe",d.createCallBasedMethod("subscribe")),(0,m.default)((0,g.default)(d),"unsubscribe",d.createCallBasedMethod("unsubscribe")),(0,m.default)((0,g.default)(d),"unsubscribeAll",d.createCallBasedMethod("unsubscribe_all")),(0,m.default)((0,g.default)(d),"status",d.createCallBasedMethod("status")),(0,m.default)((0,g.default)(d),"netInfo",d.createCallBasedMethod("net_info")),(0,m.default)((0,g.default)(d),"blockchain",d.createCallBasedMethod("blockchain")),(0,m.default)((0,g.default)(d),"genesis",d.createCallBasedMethod("genesis")),(0,m.default)((0,g.default)(d),"health",d.createCallBasedMethod("health")),(0,m.default)((0,g.default)(d),"block",d.createCallBasedMethod("block")),(0,m.default)((0,g.default)(d),"blockResults",d.createCallBasedMethod("block_results")),(0,m.default)((0,g.default)(d),"validators",d.createCallBasedMethod("validators")),(0,m.default)((0,g.default)(d),"consensusState",d.createCallBasedMethod("consensus_state")),(0,m.default)((0,g.default)(d),"dumpConsensusState",d.createCallBasedMethod("dump_consensus_state")),(0,m.default)((0,g.default)(d),"broadcastTxCommit",d.createCallBasedMethod("broadcast_tx_commit")),(0,m.default)((0,g.default)(d),"broadcastTxSync",d.createCallBasedMethod("broadcast_tx_sync")),(0,m.default)((0,g.default)(d),"broadcastTxAsync",d.createCallBasedMethod("broadcast_tx_async")),(0,m.default)((0,g.default)(d),"unconfirmedTxs",d.createCallBasedMethod("unconfirmed_txs")),(0,m.default)((0,g.default)(d),"numUnconfirmedTxs",d.createCallBasedMethod("num_unconfirmed_txs")),(0,m.default)((0,g.default)(d),"commit",d.createCallBasedMethod("commit")),(0,m.default)((0,g.default)(d),"tx",d.createCallBasedMethod("tx")),(0,m.default)((0,g.default)(d),"txSearch",d.createCallBasedMethod("tx_search")),(0,m.default)((0,g.default)(d),"abciQuery",d.createCallBasedMethod("abci_query")),(0,m.default)((0,g.default)(d),"abciInfo",d.createCallBasedMethod("abci_info"));var k=w.default.parse(A),M=k.protocol,U=k.hostname,z=k.port;if(!M||!h.includes(M)){var V=w.default.parse("http://".concat(A));M=V.protocol,U=V.hostname,z=V.port}return d.uri=z?"".concat(M,"//").concat(U,":").concat(z,"/"):"".concat(M,"//").concat(U,"/"),M&&s.includes(M)?(d.uri="".concat(d.uri,"websocket"),d.call=d.callWs,d.connectWs()):M&&l.includes(M)&&(d.call=d.callHttp),d}return(0,i.default)(W,[{key:"connectWs",value:function(){var A=this;this.ws=new x.default.obj(H.default.stringify(),(0,O.default)(this.uri)),this.ws.on("error",function(k){return A.emit("error",k)}),this.ws.on("close",function(){A.closed||A.emit("error",Error("websocket disconnected"))}),this.ws.on("data",function(k){k=JSON.parse(k),k.id&&A.emit(k.id,k.error,k.result)})}},{key:"callHttp",value:function(A,k){var M=this.uri+A;return M=I(M,k),(0,b.default)({url:M}).then(function(U){var z=U.data;if(z.error){var V=Error(z.error.message);throw Object.assign(V,z.error),V}return z.result},function(U){throw Error(U)})}},{key:"callWs",value:function(A,k,M){var U=this,z=this;return new Promise(function(V,Q){var Z,J=Math.random().toString(36),X=T(k);if(A==="subscribe"){if(typeof M!="function")throw Error("Must provide listener function");U.on(J+"#event",function(q,te){return q?z.emit("error",q):M(te.data.value)}),U.on(J,function(q){if(q)return Q(q);V()})}else U.once(J,function(q,te){if(q)return Q(q);V(te)});(Z=U.ws)===null||Z===void 0||Z.write({jsonrpc:"2.0",id:J,method:A,params:X})})}},{key:"close",value:function(){this.closed=!0,this.ws&&this.ws.destroy()}}]),W}(N.EventEmitter);f.default=E},86333:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var i=u(e(64687)),g=u(e(17156)),a=u(e(56690)),c=u(e(89728)),v=u(e(66115)),m=u(e(61655)),b=u(e(94993)),N=u(e(73808)),D=u(e(38416)),H=e(93302),x=e(57255),w=r(e(23898)),O=e(54684),S=e(20723),L=u(e(49102));function I(j,F){var W=Object.keys(j);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(j);F&&(d=d.filter(function(A){return Object.getOwnPropertyDescriptor(j,A).enumerable})),W.push.apply(W,d)}return W}function T(j){for(var F=1;F<arguments.length;F++){var W=arguments[F]!=null?arguments[F]:{};F%2?I(Object(W),!0).forEach(function(d){(0,D.default)(j,d,W[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(W)):I(Object(W)).forEach(function(d){Object.defineProperty(j,d,Object.getOwnPropertyDescriptor(W,d))})}return j}function s(j){var F=l();return function(){var d=(0,N.default)(j),A;if(F){var k=(0,N.default)(this).constructor;A=Reflect.construct(d,arguments,k)}else A=d.apply(this,arguments);return(0,b.default)(this,A)}}function l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var h=function(j){(0,m.default)(W,j);var F=s(W);function W(){var d,A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"localhost:27146",k=arguments.length>1?arguments[1]:void 0;return(0,a.default)(this,W),d=F.call(this,A),(0,D.default)((0,v.default)(d),"netWork",void 0),d.netWork=k||"mainnet",d}return(0,c.default)(W,[{key:"broadcastDelegate",value:function(){var d=(0,g.default)(i.default.mark(function k(M){var U,z;return i.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return U=M.serialize(),Q.next=3,this.broadcastTxSync({tx:p.from(U,"hex")});case 3:if(z=Q.sent,"".concat(z.code)!=="0"){Q.next=8;break}return Q.abrupt("return",z);case 8:throw new Error("broadcastDelegate: non-zero status code ".concat(z.code));case 9:case"end":return Q.stop()}},k,this)}));function A(k){return d.apply(this,arguments)}return A}()},{key:"getBech32Prefix",value:function(){return this.netWork==="mainnet"?"bnb":this.netWork==="testnet"?"tbnb":""}},{key:"getTokenInfo",value:function(){var d=(0,g.default)(i.default.mark(function k(M){var U,z,V,Q,Z,J;return i.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return(0,S.validateSymbol)(M),U="/tokens/info/"+M,q.next=4,this.abciQuery({path:U});case 4:return z=q.sent,V=p.from(z.response.value,"base64"),Q=new O.Token,(0,x.unMarshalBinaryLengthPrefixed)(V,Q),Z=this.getBech32Prefix(),J=w.encodeAddress(Q.owner,Z),delete Q.aminoPrefix,q.abrupt("return",T(T({},Q),{},{owner:J}));case 12:case"end":return q.stop()}},k,this)}));function A(k){return d.apply(this,arguments)}return A}()},{key:"listAllTokens",value:function(){var d=(0,g.default)(i.default.mark(function k(M,U){var z=this,V,Q,Z,J,X,q;return i.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return(0,S.validateOffsetLimit)(M,U),V="tokens/list/".concat(M,"/").concat(U),re.next=4,this.abciQuery({path:V});case 4:return Q=re.sent,Z=p.from(Q.response.value,"base64"),J=[new O.TokenOfList],X=(0,x.unMarshalBinaryLengthPrefixed)(Z,J),q=X.val,(0,x.unMarshalBinaryLengthPrefixed)(Z,q),re.abrupt("return",q.map(function(se){return T(T({},se),{},{owner:w.encodeAddress(se.owner,z.getBech32Prefix())})}));case 10:case"end":return re.stop()}},k,this)}));function A(k,M){return d.apply(this,arguments)}return A}()},{key:"getAccount",value:function(){var d=(0,g.default)(i.default.mark(function k(M){var U,z,V,Q;return i.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,this.abciQuery({path:"/account/".concat(M)});case 2:return U=J.sent,z=new O.AppAccount,V=p.from(U.response.value,"base64"),(0,x.unMarshalBinaryBare)(V,z),Q=this.getBech32Prefix(),J.abrupt("return",{name:z.name,locked:z.locked,frozen:z.frozen,base:T(T({},z.base),{},{address:w.encodeAddress(z.base.address,Q)})});case 8:case"end":return J.stop()}},k,this)}));function A(k){return d.apply(this,arguments)}return A}()},{key:"getBalances",value:function(){var d=(0,g.default)(i.default.mark(function k(M){var U,z,V;return i.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,this.getAccount(M);case 2:return U=Z.sent,z=[],V=[],U&&(z=U.base&&U.base.coins||[],(0,S.convertObjectArrayNum)(z,["amount"]),(0,S.convertObjectArrayNum)(U.locked,["amount"]),(0,S.convertObjectArrayNum)(U.frozen,["amount"])),z.forEach(function(J){var X=U.locked.find(function(re){return J.denom===re.denom})||{},q=U.frozen.find(function(re){return J.denom===re.denom})||{},te=new O.TokenBalance;te.symbol=J.denom,te.free=+new H.Big(J.amount).toString(),te.locked=X.amount||0,te.frozen=q.amount||0,V.push(te)}),Z.abrupt("return",V);case 8:case"end":return Z.stop()}},k,this)}));function A(k){return d.apply(this,arguments)}return A}()},{key:"getBalance",value:function(){var d=(0,g.default)(i.default.mark(function k(M,U){var z,V;return i.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return(0,S.validateSymbol)(U),Z.next=3,this.getBalances(M);case 3:return z=Z.sent,V=z.find(function(J){return J.symbol.toUpperCase()===U.toUpperCase()}),Z.abrupt("return",V);case 6:case"end":return Z.stop()}},k,this)}));function A(k,M){return d.apply(this,arguments)}return A}()},{key:"getOpenOrders",value:function(){var d=(0,g.default)(i.default.mark(function k(M,U){var z,V,Q,Z,J,X;return i.default.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return z="/dex/openorders/".concat(U,"/").concat(M),te.next=3,this.abciQuery({path:z});case 3:return V=te.sent,Q=p.from(V.response.value,"base64"),Z=[new O.OpenOrder],J=(0,x.unMarshalBinaryLengthPrefixed)(Q,Z),X=J.val,(0,S.convertObjectArrayNum)(X,["price","quantity","cumQty"]),te.abrupt("return",X);case 9:case"end":return te.stop()}},k,this)}));function A(k,M){return d.apply(this,arguments)}return A}()},{key:"getTradingPairs",value:function(){var d=(0,g.default)(i.default.mark(function k(M,U){var z,V,Q,Z,J,X;return i.default.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return(0,S.validateOffsetLimit)(M,U),z="/dex/pairs/".concat(M,"/").concat(U),te.next=4,this.abciQuery({path:z});case 4:return V=te.sent,Q=p.from(V.response.value,"base64"),Z=[new O.TradingPair],J=(0,x.unMarshalBinaryLengthPrefixed)(Q,Z),X=J.val,(0,S.convertObjectArrayNum)(X,["list_price","tick_size","lot_size"]),te.abrupt("return",X);case 10:case"end":return te.stop()}},k,this)}));function A(k,M){return d.apply(this,arguments)}return A}()},{key:"getDepth",value:function(){var d=(0,g.default)(i.default.mark(function k(M){var U,z,V,Q,Z,J;return i.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return(0,S.validateTradingPair)(M),U="dex/orderbook/".concat(M),q.next=4,this.abciQuery({path:U});case 4:return z=q.sent,V=p.from(z.response.value,"base64"),Q=new O.OrderBook,Z=(0,x.unMarshalBinaryLengthPrefixed)(V,Q),J=Z.val,(0,S.convertObjectArrayNum)(J.levels,["buyQty","buyPrice","sellQty","sellPrice"]),q.abrupt("return",J);case 10:case"end":return q.stop()}},k,this)}));function A(k){return d.apply(this,arguments)}return A}()},{key:"getTxByHash",value:function(){var d=(0,g.default)(i.default.mark(function k(M){var U,z,V,Q,Z,J,X,q,te,re=arguments;return i.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return U=re.length>1&&re[1]!==void 0?re[1]:!0,p.isBuffer(M)||(M=p.from(M,"hex")),ne.next=4,this.tx({hash:M,prove:U});case 4:return z=ne.sent,V=p.from(z.tx,"base64"),Q=V.slice(8,12).toString("hex"),Z=(0,S.getMsgByAminoPrefix)(Q),J={msg:[Z.defaultMsg()],signatures:[{pub_key:p.from(""),signature:p.from(""),account_number:0,sequence:0}],memo:"",source:0,data:"",aminoPrefix:O.AminoPrefix.StdTx},X=(0,x.unMarshalBinaryLengthPrefixed)(V,J),q=X.val,te=this.parseTxResult(z.tx_result),ne.abrupt("return",T(T({},z),{},{tx:q,tx_result:te}));case 12:case"end":return ne.stop()}},k,this)}));function A(k){return d.apply(this,arguments)}return A}()},{key:"parseTxResult",value:function(A){if(A.data&&(A.data=p.from(A.data,"base64").toString()),A.events&&A.events.length>0)for(var k=0;k<A.events.length;k++){var M=A.events[k];M.attributes&&M.attributes.length>0&&(M.attributes=M.attributes.map(function(U){return{key:p.from(U.key,"base64").toString(),value:p.from(U.value,"base64").toString()}}))}return A.tags&&A.tags.length>0&&(A.tags=A.tags.map(function(U){return{key:p.from(U.key,"base64").toString(),value:p.from(U.value,"base64").toString()}})),T({},A)}}]),W}(L.default),E=h;f.default=E},62455:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(38416)),c=e(57255),v=r(e(23898)),m=e(54684),b=function(){function N(D){if((0,i.default)(this,N),(0,a.default)(this,"sequence",void 0),(0,a.default)(this,"accountNumber",void 0),(0,a.default)(this,"chainId",void 0),(0,a.default)(this,"msg",void 0),(0,a.default)(this,"baseMsg",void 0),(0,a.default)(this,"memo",void 0),(0,a.default)(this,"source",void 0),(0,a.default)(this,"signatures",void 0),D=D||{},!D.chainId)throw new Error("chain id should not be null");this.sequence=D.sequence||0,this.accountNumber=D.accountNumber||0,this.chainId=D.chainId,this.msg=D.msg,this.baseMsg=D.baseMsg,this.memo=D.memo,this.source=D.source||0,this.signatures=[]}return(0,g.default)(N,[{key:"getSignBytes",value:function(H){H=H||this.baseMsg&&this.baseMsg.getSignMsg();var x={account_number:this.accountNumber.toString(),chain_id:this.chainId,data:null,memo:this.memo,msgs:[H],sequence:this.sequence.toString(),source:this.source.toString()};return(0,c.convertObjectToSignBytes)(x)}},{key:"addSignature",value:function(H,x){var w=this._serializePubKey(H);return this.signatures=[{pub_key:w,signature:x,account_number:this.accountNumber,sequence:this.sequence}],this}},{key:"sign",value:function(H,x){if(!H)throw new Error("private key should not be null");var w=this.getSignBytes(x),O=p.from(H,"hex"),S=v.generateSignature(w.toString("hex"),O);return this.addSignature(v.generatePubKey(O),S),this}},{key:"serialize",value:function(){if(!this.signatures)throw new Error("need signature");var H=this.msg||this.baseMsg&&this.baseMsg.getMsg(),x={msg:[H],signatures:this.signatures,memo:this.memo,source:this.source,data:"",aminoPrefix:m.AminoPrefix.StdTx},w=(0,c.marshalBinary)(x);return w.toString("hex")}},{key:"_serializePubKey",value:function(H){var x=2,w=H.getY(),O=H.getX();w&&w.isOdd()&&(x|=1);var S=p.concat([c.UVarInt.encode(x),O.toArrayLike(p,"be",32)]);return S=(0,c.encodeBinaryByteArray)(S),S=p.concat([p.from("EB5AE987","hex"),S]),S}}]),N}();f.default=b},54684:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(40477);Object.keys(p).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return p[i]}})});var r=e(8951);Object.keys(r).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return r[i]}})});var u=e(86057);Object.keys(u).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return u[i]}})})},43736:function(G,f,e){"use strict";var p=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.BaseMsg=void 0;var r=p(e(56690)),u=p(e(89728)),i=function(){function g(){(0,r.default)(this,g)}return(0,u.default)(g,null,[{key:"defaultMsg",value:function(){return{}}}]),g}();f.BaseMsg=i},944:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.BindMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.from,h=T.symbol,E=T.amount,j=T.contract_address,F=T.contract_decimals,W=T.expire_time;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"symbol",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),(0,b.default)((0,a.default)(s),"contract_address",void 0),(0,b.default)((0,a.default)(s),"contract_decimals",void 0),(0,b.default)((0,a.default)(s),"expire_time",void 0),s.from=l,s.symbol=h,s.amount=E,s.contract_address=j,s.contract_decimals=F,s.expire_time=W,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){return{from:this.from,symbol:this.symbol,amount:this.amount,contract_address:this.contract_address,contract_decimals:this.contract_decimals,expire_time:this.expire_time}}},{key:"getMsg",value:function(){return{from:D.decodeAddress(this.from),symbol:this.symbol,amount:this.amount,contract_address:p.from(this.contract_address.slice(2),"hex"),contract_decimals:this.contract_decimals,expire_time:this.expire_time,aminoPrefix:H.AminoPrefix.BindMsg}}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),symbol:"",amount:0,contract_address:p.from(""),contract_decimals:0,expire_time:0,aminoPrefix:H.AminoPrefix.BindMsg}}}]),I}(N.BaseMsg);f.BindMsg=O},3413:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.ClaimMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951),x=e(46813);function w(L){var I=O();return function(){var s=(0,m.default)(L),l;if(I){var h=(0,m.default)(this).constructor;l=Reflect.construct(s,arguments,h)}else l=s.apply(this,arguments);return(0,v.default)(this,l)}}function O(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var S=function(L){(0,c.default)(T,L);var I=w(T);function T(s){var l,h=s.claim_type,E=s.sequence,j=s.claim,F=s.validator_address;return(0,i.default)(this,T),l=I.call(this),(0,b.default)((0,a.default)(l),"claim_type",void 0),(0,b.default)((0,a.default)(l),"sequence",void 0),(0,b.default)((0,a.default)(l),"claim",void 0),(0,b.default)((0,a.default)(l),"validator_address",void 0),l.claim_type=h,l.sequence=E,l.claim=j,l.validator_address=F,l}return(0,g.default)(T,[{key:"getSignMsg",value:function(){return{claim_type:this.claim_type,sequence:this.sequence,claim:this.claim,validator_address:this.validator_address}}},{key:"getMsg",value:function(){return{claim_type:this.claim_type,sequence:this.sequence,claim:this.claim,validator_address:D.decodeAddress(this.validator_address),aminoPrefix:H.AminoPrefix.ClaimMsg}}}],[{key:"defaultMsg",value:function(){return{claim_type:x.ClaimTypes.ClaimTypeSkipSequence,sequence:0,claim:"",validator_address:p.from(""),aminoPrefix:H.AminoPrefix.ClaimMsg}}}]),T}(N.BaseMsg);f.ClaimMsg=S},46813:function(G,f){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.BindStatus=f.RefundReason=f.ClaimTypes=void 0;var e;f.ClaimTypes=e,function(u){u[u.ClaimTypeSkipSequence=1]="ClaimTypeSkipSequence",u[u.ClaimTypeUpdateBind=2]="ClaimTypeUpdateBind",u[u.ClaimTypeTransferOutRefund=3]="ClaimTypeTransferOutRefund",u[u.ClaimTypeTransferIn=4]="ClaimTypeTransferIn"}(e||(f.ClaimTypes=e={}));var p;f.RefundReason=p,function(u){u[u.UnboundToken=1]="UnboundToken",u[u.Timeout=2]="Timeout",u[u.InsufficientBalance=3]="InsufficientBalance",u[u.Unkown=4]="Unkown"}(p||(f.RefundReason=p={}));var r;f.BindStatus=r,function(u){u[u.BindStatusSuccess=0]="BindStatusSuccess",u[u.BindStatusRejected=1]="BindStatusRejected",u[u.BindStatusTimeout=2]="BindStatusTimeout",u[u.BindStatusInvalidParameter=3]="BindStatusInvalidParameter"}(r||(f.BindStatus=r={}))},80089:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(944);Object.keys(p).forEach(function(g){g==="default"||g==="__esModule"||Object.defineProperty(f,g,{enumerable:!0,get:function(){return p[g]}})});var r=e(3413);Object.keys(r).forEach(function(g){g==="default"||g==="__esModule"||Object.defineProperty(f,g,{enumerable:!0,get:function(){return r[g]}})});var u=e(46813);Object.keys(u).forEach(function(g){g==="default"||g==="__esModule"||Object.defineProperty(f,g,{enumerable:!0,get:function(){return u[g]}})});var i=e(31173);Object.keys(i).forEach(function(g){g==="default"||g==="__esModule"||Object.defineProperty(f,g,{enumerable:!0,get:function(){return i[g]}})})},31173:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.TransferOutMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=u(e(93302)),D=e(40477),H=r(e(23898)),x=e(8951);function w(T,s){var l=Object.keys(T);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(T);s&&(h=h.filter(function(E){return Object.getOwnPropertyDescriptor(T,E).enumerable})),l.push.apply(l,h)}return l}function O(T){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?w(Object(l),!0).forEach(function(h){(0,b.default)(T,h,l[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(l)):w(Object(l)).forEach(function(h){Object.defineProperty(T,h,Object.getOwnPropertyDescriptor(l,h))})}return T}function S(T){var s=L();return function(){var h=(0,m.default)(T),E;if(s){var j=(0,m.default)(this).constructor;E=Reflect.construct(h,arguments,j)}else E=h.apply(this,arguments);return(0,v.default)(this,E)}}function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var I=function(T){(0,c.default)(l,T);var s=S(l);function l(h){var E,j=h.from,F=h.to,W=h.amount,d=h.expire_time;return(0,i.default)(this,l),E=s.call(this),(0,b.default)((0,a.default)(E),"from",void 0),(0,b.default)((0,a.default)(E),"to",void 0),(0,b.default)((0,a.default)(E),"amount",void 0),(0,b.default)((0,a.default)(E),"expire_time",void 0),E.from=j,E.to=F,E.amount=O(O({},W),{},{amount:Number(new N.default(W.amount).mul(Math.pow(10,8)).toString())}),E.expire_time=d,E}return(0,g.default)(l,[{key:"getSignMsg",value:function(){return{from:this.from,to:this.to,amount:this.amount,expire_time:this.expire_time}}},{key:"getMsg",value:function(){return{from:H.decodeAddress(this.from),to:p.from(this.to.slice(2),"hex"),amount:this.amount,expire_time:this.expire_time,aminoPrefix:x.AminoPrefix.TransferOutMsg}}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),to:p.from(""),amount:{denom:"",amount:0},expire_time:0,aminoPrefix:x.AminoPrefix.TransferOutMsg}}}]),l}(D.BaseMsg);f.TransferOutMsg=I},95151:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.CancelOrderMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=r(e(23898)),D=e(8951),H=e(43736);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T,s,l){var h;return(0,i.default)(this,I),h=L.call(this),(0,b.default)((0,a.default)(h),"address",void 0),(0,b.default)((0,a.default)(h),"symbol",void 0),(0,b.default)((0,a.default)(h),"orderId",void 0),(0,b.default)((0,a.default)(h),"aminoPrefix",D.AminoPrefix.CancelOrderMsg),h.address=T,h.symbol=s,h.orderId=l,h}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={sender:this.address,symbol:this.symbol,refid:this.orderId};return s}},{key:"getMsg",value:function(){var s={sender:N.decodeAddress(this.address),symbol:this.symbol,refid:this.orderId,aminoPrefix:D.AminoPrefix.CancelOrderMsg};return s}}],[{key:"defaultMsg",value:function(){return{sender:p.from(""),symbol:"",refid:"",aminoPrefix:D.AminoPrefix.CancelOrderMsg}}}]),I}(H.BaseMsg);f.CancelOrderMsg=O},76029:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(95151);Object.keys(p).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return p[i]}})});var r=e(74274);Object.keys(r).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return r[i]}})});var u=e(74250);Object.keys(u).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return u[i]}})})},74250:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.ListMiniMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=r(e(23898)),D=e(8951),H=e(43736);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.from,h=T.base_asset_symbol,E=T.quote_asset_symbol,j=T.init_price;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"base_asset_symbol",void 0),(0,b.default)((0,a.default)(s),"quote_asset_symbol",void 0),(0,b.default)((0,a.default)(s),"init_price",void 0),s.from=l,s.base_asset_symbol=h,s.quote_asset_symbol=E,s.init_price=j,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,base_asset_symbol:this.base_asset_symbol,quote_asset_symbol:this.quote_asset_symbol,init_price:this.init_price};return s}},{key:"getMsg",value:function(){var s={from:N.decodeAddress(this.from),base_asset_symbol:this.base_asset_symbol,quote_asset_symbol:this.quote_asset_symbol,init_price:this.init_price,aminoPrefix:D.AminoPrefix.ListMiniMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),base_asset_symbol:"",quote_asset_symbol:"",init_price:0,aminoPrefix:D.AminoPrefix.ListMiniMsg}}}]),I}(H.BaseMsg);f.ListMiniMsg=O},74274:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.NewOrderMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=u(e(93302)),D=e(40477),H=r(e(23898)),x=e(8951);function w(s,l){var h=Object.keys(s);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(s);l&&(E=E.filter(function(j){return Object.getOwnPropertyDescriptor(s,j).enumerable})),h.push.apply(h,E)}return h}function O(s){for(var l=1;l<arguments.length;l++){var h=arguments[l]!=null?arguments[l]:{};l%2?w(Object(h),!0).forEach(function(E){(0,b.default)(s,E,h[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(h)):w(Object(h)).forEach(function(E){Object.defineProperty(s,E,Object.getOwnPropertyDescriptor(h,E))})}return s}function S(s){var l=L();return function(){var E=(0,m.default)(s),j;if(l){var F=(0,m.default)(this).constructor;j=Reflect.construct(E,arguments,F)}else j=E.apply(this,arguments);return(0,v.default)(this,j)}}function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var I=Math.pow(10,8),T=function(s){(0,c.default)(h,s);var l=S(h);function h(E,j){var F;(0,i.default)(this,h),F=l.call(this),(0,b.default)((0,a.default)(F),"newOrder",void 0),(0,b.default)((0,a.default)(F),"address",void 0),(0,b.default)((0,a.default)(F),"aminoPrefix",x.AminoPrefix.NewOrderMsg);var W=new N.default(E.price),d=new N.default(E.quantity);return F.newOrder=E,F.newOrder.price=Number(W.mul(I).toString()),F.newOrder.quantity=Number(d.mul(I).toString()),F.address=j,F}return(0,g.default)(h,[{key:"getSignMsg",value:function(){var j=O({sender:this.address},this.newOrder);return j}},{key:"getMsg",value:function(){var j={sender:H.decodeAddress(this.address),id:this.newOrder.id,symbol:this.newOrder.symbol,ordertype:this.newOrder.ordertype,side:this.newOrder.side,price:this.newOrder.price,quantity:this.newOrder.quantity,timeinforce:this.newOrder.timeinforce,aminoPrefix:this.aminoPrefix};return j}}],[{key:"defaultMsg",value:function(){return{sender:p.from(""),id:"",symbol:"",orderType:0,side:0,price:0,quantity:0,timeinforce:0,aminoPrefix:x.AminoPrefix.NewOrderMsg}}}]),h}(D.BaseMsg);f.NewOrderMsg=T},40477:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(43736);Object.keys(p).forEach(function(c){c==="default"||c==="__esModule"||Object.defineProperty(f,c,{enumerable:!0,get:function(){return p[c]}})});var r=e(76029);Object.keys(r).forEach(function(c){c==="default"||c==="__esModule"||Object.defineProperty(f,c,{enumerable:!0,get:function(){return r[c]}})});var u=e(55308);Object.keys(u).forEach(function(c){c==="default"||c==="__esModule"||Object.defineProperty(f,c,{enumerable:!0,get:function(){return u[c]}})});var i=e(63790);Object.keys(i).forEach(function(c){c==="default"||c==="__esModule"||Object.defineProperty(f,c,{enumerable:!0,get:function(){return i[c]}})});var g=e(80089);Object.keys(g).forEach(function(c){c==="default"||c==="__esModule"||Object.defineProperty(f,c,{enumerable:!0,get:function(){return g[c]}})});var a=e(54457);Object.keys(a).forEach(function(c){c==="default"||c==="__esModule"||Object.defineProperty(f,c,{enumerable:!0,get:function(){return a[c]}})})},63790:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.SendMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=u(e(93302)),D=r(e(23898)),H=e(8951),x=e(40477);function w(T,s){var l=Object.keys(T);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(T);s&&(h=h.filter(function(E){return Object.getOwnPropertyDescriptor(T,E).enumerable})),l.push.apply(l,h)}return l}function O(T){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?w(Object(l),!0).forEach(function(h){(0,b.default)(T,h,l[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(l)):w(Object(l)).forEach(function(h){Object.defineProperty(T,h,Object.getOwnPropertyDescriptor(l,h))})}return T}function S(T){var s=L();return function(){var h=(0,m.default)(T),E;if(s){var j=(0,m.default)(this).constructor;E=Reflect.construct(h,arguments,j)}else E=h.apply(this,arguments);return(0,v.default)(this,E)}}function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var I=function(T){(0,c.default)(l,T);var s=S(l);function l(h,E){var j;return(0,i.default)(this,l),j=s.call(this),(0,b.default)((0,a.default)(j),"sender",void 0),(0,b.default)((0,a.default)(j),"outputs",void 0),(0,b.default)((0,a.default)(j),"aminoPrefix",H.AminoPrefix.MsgSend),j.sender=h,j.outputs=E,j}return(0,g.default)(l,[{key:"calInputCoins",value:function(E,j){j.forEach(function(F){var W=E.find(function(A){return A.denom===F.denom});if(W){var d=new N.default(W.amount);W.amount=Number(d.plus(F.amount).toString())}else E.push(O({},F))})}},{key:"getSignMsg",value:function(){var E=this,j={inputs:[{address:this.sender,coins:[]}],outputs:this.outputs};return this.outputs.forEach(function(F){E.calInputCoins(j.inputs[0].coins,F.coins)}),j}},{key:"getMsg",value:function(){var E=this,j={inputs:[{address:D.decodeAddress(this.sender),coins:[]}],outputs:[],aminoPrefix:this.aminoPrefix};return this.outputs.forEach(function(F){E.calInputCoins(j.inputs[0].coins,F.coins);var W={address:D.decodeAddress(F.address),coins:F.coins};j.outputs.push(W)}),j}}],[{key:"defaultMsg",value:function(){return{inputs:[{address:p.from(""),coins:[{denom:"",amount:0}]}],outputs:[{address:p.from(""),coins:[{denom:"",amount:0}]}],aminoPrefix:H.AminoPrefix.MsgSend}}}]),l}(x.BaseMsg);f.SendMsg=I},64806:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.BscDelegateMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.delegator_addr,h=T.validator_addr,E=T.delegation,j=T.side_chain_id;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"delegator_addr",void 0),(0,b.default)((0,a.default)(s),"validator_addr",void 0),(0,b.default)((0,a.default)(s),"delegation",void 0),(0,b.default)((0,a.default)(s),"side_chain_id",void 0),s.delegator_addr=l,s.validator_addr=h,s.delegation=E,s.side_chain_id=j,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s=this.delegation,l=s.denom,h=s.amount,E={delegator_addr:this.delegator_addr,validator_addr:this.validator_addr,delegation:{denom:l,amount:String(h)},side_chain_id:this.side_chain_id};return{type:"cosmos-sdk/MsgSideChainDelegate",value:E}}},{key:"getMsg",value:function(){var s={delegator_addr:D.decodeAddress(this.delegator_addr),validator_addr:D.decodeAddress(this.validator_addr),delegation:this.delegation,side_chain_id:this.side_chain_id,aminoPrefix:H.AminoPrefix.MsgSideChainDelegate};return s}}],[{key:"defaultMsg",value:function(){return{delegator_addr:p.from(""),validator_addr:p.from(""),delegation:[{denom:"",amount:0}],side_chain_id:"",aminoPrefix:H.AminoPrefix.MsgSideChainDelegate}}}]),I}(N.BaseMsg);f.BscDelegateMsg=O},14727:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.BscReDelegateMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.delegator_addr,h=T.validator_src_addr,E=T.validator_dst_addr,j=T.amount,F=T.side_chain_id;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"delegator_addr",void 0),(0,b.default)((0,a.default)(s),"validator_src_addr",void 0),(0,b.default)((0,a.default)(s),"validator_dst_addr",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),(0,b.default)((0,a.default)(s),"side_chain_id",void 0),s.delegator_addr=l,s.validator_src_addr=h,s.validator_dst_addr=E,s.amount=j,s.side_chain_id=F,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s=this.amount,l=s.denom,h=s.amount,E={delegator_addr:this.delegator_addr,validator_src_addr:this.validator_src_addr,validator_dst_addr:this.validator_dst_addr,amount:{denom:l,amount:String(h)},side_chain_id:this.side_chain_id};return{type:"cosmos-sdk/MsgSideChainRedelegate",value:E}}},{key:"getMsg",value:function(){var s={delegator_addr:D.decodeAddress(this.delegator_addr),validator_src_addr:D.decodeAddress(this.validator_src_addr),validator_dst_addr:D.decodeAddress(this.validator_dst_addr),amount:this.amount,side_chain_id:this.side_chain_id,aminoPrefix:H.AminoPrefix.MsgSideChainRedelegate};return s}}],[{key:"defaultMsg",value:function(){return{delegator_addr:p.from(""),validator_src_addr:p.from(""),validator_dst_addr:p.from(""),amount:[{denom:"",amount:0}],side_chain_id:"",aminoPrefix:H.AminoPrefix.MsgSideChainRedelegate}}}]),I}(N.BaseMsg);f.BscReDelegateMsg=O},95164:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.BscUndelegateMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.delegator_addr,h=T.validator_addr,E=T.amount,j=T.side_chain_id;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"delegator_addr",void 0),(0,b.default)((0,a.default)(s),"validator_addr",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),(0,b.default)((0,a.default)(s),"side_chain_id",void 0),s.delegator_addr=l,s.validator_addr=h,s.amount=E,s.side_chain_id=j,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s=this.amount,l=s.denom,h=s.amount,E={delegator_addr:this.delegator_addr,validator_addr:this.validator_addr,amount:{denom:l,amount:String(h)},side_chain_id:this.side_chain_id};return{type:"cosmos-sdk/MsgSideChainUndelegate",value:E}}},{key:"getMsg",value:function(){var s={delegator_addr:D.decodeAddress(this.delegator_addr),validator_addr:D.decodeAddress(this.validator_addr),amount:this.amount,side_chain_id:this.side_chain_id,aminoPrefix:H.AminoPrefix.MsgSideChainUndelegate};return s}}],[{key:"defaultMsg",value:function(){return{delegator_addr:p.from(""),validator_addr:p.from(""),amount:[{denom:"",amount:0}],side_chain_id:"",aminoPrefix:H.AminoPrefix.MsgSideChainUndelegate}}}]),I}(N.BaseMsg);f.BscUndelegateMsg=O},54457:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(64806);Object.keys(p).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return p[i]}})});var r=e(95164);Object.keys(r).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return r[i]}})});var u=e(14727);Object.keys(u).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return u[i]}})})},41325:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.BurnTokenMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.address,h=T.sybmol,E=T.amount;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"symbol",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),s.from=l,s.symbol=h,s.amount=E,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,symbol:this.symbol,amount:this.amount};return s}},{key:"getMsg",value:function(){var s={from:D.decodeAddress(this.from),symbol:this.symbol,amount:this.amount,aminoPrefix:H.AminoPrefix.BurnMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),symbol:"",amount:0,aminoPrefix:H.AminoPrefix.BurnMsg}}}]),I}(N.BaseMsg);f.BurnTokenMsg=O},72040:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.FreezeTokenMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.address,h=T.sybmol,E=T.amount;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"symbol",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),s.from=l,s.symbol=h,s.amount=E,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,symbol:this.symbol,amount:this.amount};return s}},{key:"getMsg",value:function(){var s={from:D.decodeAddress(this.from),symbol:this.symbol,amount:this.amount,aminoPrefix:H.AminoPrefix.FreezeMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),symbol:"",amount:0,aminoPrefix:H.AminoPrefix.FreezeMsg}}}]),I}(N.BaseMsg);f.FreezeTokenMsg=O},55308:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(41325);Object.keys(p).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return p[D]}})});var r=e(72040);Object.keys(r).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return r[D]}})});var u=e(30771);Object.keys(u).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return u[D]}})});var i=e(35322);Object.keys(i).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return i[D]}})});var g=e(56940);Object.keys(g).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return g[D]}})});var a=e(22234);Object.keys(a).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return a[D]}})});var c=e(63987);Object.keys(c).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return c[D]}})});var v=e(38713);Object.keys(v).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return v[D]}})});var m=e(36363);Object.keys(m).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return m[D]}})});var b=e(50640);Object.keys(b).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return b[D]}})});var N=e(13219);Object.keys(N).forEach(function(D){D==="default"||D==="__esModule"||Object.defineProperty(f,D,{enumerable:!0,get:function(){return N[D]}})})},36363:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.IssueMiniTokenMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(I,T){var s=Object.keys(I);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(I);T&&(l=l.filter(function(h){return Object.getOwnPropertyDescriptor(I,h).enumerable})),s.push.apply(s,l)}return s}function w(I){for(var T=1;T<arguments.length;T++){var s=arguments[T]!=null?arguments[T]:{};T%2?x(Object(s),!0).forEach(function(l){(0,b.default)(I,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(s)):x(Object(s)).forEach(function(l){Object.defineProperty(I,l,Object.getOwnPropertyDescriptor(s,l))})}return I}function O(I){var T=S();return function(){var l=(0,m.default)(I),h;if(T){var E=(0,m.default)(this).constructor;h=Reflect.construct(l,arguments,E)}else h=l.apply(this,arguments);return(0,v.default)(this,h)}}function S(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var L=function(I){(0,c.default)(s,I);var T=O(s);function s(l){var h;return(0,i.default)(this,s),h=T.call(this),(0,b.default)((0,a.default)(h),"params",void 0),h.params=l,h}return(0,g.default)(s,[{key:"getSignMsg",value:function(){var h=w({},this.params);return h}},{key:"getMsg",value:function(){var h={from:D.decodeAddress(this.params.from),name:this.params.name,symbol:this.params.symbol,total_supply:this.params.total_supply,mintable:this.params.mintable,token_uri:this.params.token_uri,aminoPrefix:H.AminoPrefix.IssueMiniMsg};return h}}],[{key:"defaultMsg",value:function(){return{from:p.from,name:"",symbol:"",total_supply:0,mintable:!1,token_uri:"",aminoPrefix:H.AminoPrefix.IssueMiniMsg}}}]),s}(N.BaseMsg);f.IssueMiniTokenMsg=L},50640:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.IssueTinyTokenMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(I,T){var s=Object.keys(I);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(I);T&&(l=l.filter(function(h){return Object.getOwnPropertyDescriptor(I,h).enumerable})),s.push.apply(s,l)}return s}function w(I){for(var T=1;T<arguments.length;T++){var s=arguments[T]!=null?arguments[T]:{};T%2?x(Object(s),!0).forEach(function(l){(0,b.default)(I,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(s)):x(Object(s)).forEach(function(l){Object.defineProperty(I,l,Object.getOwnPropertyDescriptor(s,l))})}return I}function O(I){var T=S();return function(){var l=(0,m.default)(I),h;if(T){var E=(0,m.default)(this).constructor;h=Reflect.construct(l,arguments,E)}else h=l.apply(this,arguments);return(0,v.default)(this,h)}}function S(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var L=function(I){(0,c.default)(s,I);var T=O(s);function s(l){var h;return(0,i.default)(this,s),h=T.call(this),(0,b.default)((0,a.default)(h),"params",void 0),h.params=l,h}return(0,g.default)(s,[{key:"getSignMsg",value:function(){var h=w({},this.params);return h}},{key:"getMsg",value:function(){var h={from:D.decodeAddress(this.params.from),name:this.params.name,symbol:this.params.symbol,total_supply:this.params.total_supply,mintable:this.params.mintable,token_uri:this.params.token_uri,aminoPrefix:H.AminoPrefix.IssueTinyMsg};return h}}],[{key:"defaultMsg",value:function(){return{from:p.from,name:"",symbol:"",total_supply:0,mintable:!1,token_uri:"",aminoPrefix:H.AminoPrefix.IssueTinyMsg}}}]),s}(N.BaseMsg);f.IssueTinyTokenMsg=L},35322:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.IssueTokenMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(I,T){var s=Object.keys(I);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(I);T&&(l=l.filter(function(h){return Object.getOwnPropertyDescriptor(I,h).enumerable})),s.push.apply(s,l)}return s}function w(I){for(var T=1;T<arguments.length;T++){var s=arguments[T]!=null?arguments[T]:{};T%2?x(Object(s),!0).forEach(function(l){(0,b.default)(I,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(s)):x(Object(s)).forEach(function(l){Object.defineProperty(I,l,Object.getOwnPropertyDescriptor(s,l))})}return I}function O(I){var T=S();return function(){var l=(0,m.default)(I),h;if(T){var E=(0,m.default)(this).constructor;h=Reflect.construct(l,arguments,E)}else h=l.apply(this,arguments);return(0,v.default)(this,h)}}function S(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var L=function(I){(0,c.default)(s,I);var T=O(s);function s(l,h){var E;return(0,i.default)(this,s),E=T.call(this),(0,b.default)((0,a.default)(E),"from",void 0),(0,b.default)((0,a.default)(E),"params",void 0),E.from=h,E.params=l,E}return(0,g.default)(s,[{key:"getSignMsg",value:function(){var h=w({from:this.from},this.params);return h}},{key:"getMsg",value:function(){var h={from:D.decodeAddress(this.from),name:this.params.name,symbol:this.params.symbol,total_supply:this.params.total_supply,mintable:this.params.mintable,aminoPrefix:H.AminoPrefix.IssueMsg};return h}}],[{key:"defaultMsg",value:function(){return{from:p.from,name:"",symbol:"",total_supply:0,mintable:!1,aminoPrefix:H.AminoPrefix.IssueMsg}}}]),s}(N.BaseMsg);f.IssueTokenMsg=L},56940:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.MintTokenMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=u(e(93302)),D=e(40477),H=r(e(23898)),x=e(8951);function w(L){var I=O();return function(){var s=(0,m.default)(L),l;if(I){var h=(0,m.default)(this).constructor;l=Reflect.construct(s,arguments,h)}else l=s.apply(this,arguments);return(0,v.default)(this,l)}}function O(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var S=function(L){(0,c.default)(T,L);var I=w(T);function T(s){var l,h=s.address,E=s.sybmol,j=s.amount;return(0,i.default)(this,T),l=I.call(this),(0,b.default)((0,a.default)(l),"from",void 0),(0,b.default)((0,a.default)(l),"symbol",void 0),(0,b.default)((0,a.default)(l),"amount",void 0),l.from=h,l.symbol=E,l.amount=j,l}return(0,g.default)(T,[{key:"getSignMsg",value:function(){var l={from:this.from,amount:Number(new N.default(this.amount).mul(Math.pow(10,8)).toString()),symbol:this.symbol};return l}},{key:"getMsg",value:function(){var l={from:H.decodeAddress(this.from),symbol:this.symbol,amount:Number(new N.default(this.amount).mul(Math.pow(10,8)).toString()),aminoPrefix:x.AminoPrefix.MintMsg};return l}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),symbol:"",amount:0,aminoPrefix:x.AminoPrefix.MintMsg}}}]),T}(D.BaseMsg);f.MintTokenMsg=S},13219:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.SetTokenUriMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.from,h=T.symbol,E=T.token_uri;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"symbol",void 0),(0,b.default)((0,a.default)(s),"token_uri",void 0),s.from=l,s.symbol=h,s.token_uri=E,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,symbol:this.symbol,token_uri:this.token_uri};return s}},{key:"getMsg",value:function(){var s={from:D.decodeAddress(this.from),symbol:this.symbol,token_uri:this.token_uri,aminoPrefix:H.AminoPrefix.SetURIMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),symbol:"",token_uri:"",aminoPrefix:H.AminoPrefix.SetURIMsg}}}]),I}(N.BaseMsg);f.SetTokenUriMsg=O},63987:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.TimeReLockMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.address,h=T.time_lock_id,E=T.description,j=T.amount,F=T.lock_time;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"time_lock_id",void 0),(0,b.default)((0,a.default)(s),"description",void 0),(0,b.default)((0,a.default)(s),"lock_time",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),s.from=l,s.description=E,s.amount=j,s.lock_time=F,s.time_lock_id=h,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,time_lock_id:this.time_lock_id,amount:this.amount,description:this.description,lock_time:this.lock_time};return s}},{key:"getMsg",value:function(){var s={from:D.decodeAddress(this.from),time_lock_id:this.time_lock_id,description:this.description,amount:this.amount,lock_time:this.lock_time,aminoPrefix:H.AminoPrefix.TimeRelockMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),description:"",amount:0,lock_time:0,aminoPrefix:H.AminoPrefix.TimeRelockMsg}}}]),I}(N.BaseMsg);f.TimeReLockMsg=O},38713:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.TimeUnlockMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.address,h=T.time_lock_id;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"time_lock_id",void 0),s.from=l,s.time_lock_id=h,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,time_lock_id:this.time_lock_id};return s}},{key:"getMsg",value:function(){var s={from:D.decodeAddress(this.from),time_lock_id:this.time_lock_id,aminoPrefix:H.AminoPrefix.TimeUnlockMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),time_lock_id:0,aminoPrefix:H.AminoPrefix.TimeUnlockMsg}}}]),I}(N.BaseMsg);f.TimeUnlockMsg=O},22234:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.TimeLockMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.address,h=T.description,E=T.amount,j=T.lock_time;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"description",void 0),(0,b.default)((0,a.default)(s),"lock_time",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),s.from=l,s.description=h,s.amount=E,s.lock_time=j,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,amount:this.amount,description:this.description,lock_time:this.lock_time};return s}},{key:"getMsg",value:function(){var s={from:D.decodeAddress(this.from),description:this.description,amount:this.amount,lock_time:this.lock_time,aminoPrefix:H.AminoPrefix.TimeLockMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),description:"",amount:[{denom:"",amount:0}],lock_time:0,aminoPrefix:H.AminoPrefix.TimeLockMsg}}}]),I}(N.BaseMsg);f.TimeLockMsg=O},30771:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.UnFreezeTokenMsg=void 0;var i=u(e(56690)),g=u(e(89728)),a=u(e(66115)),c=u(e(61655)),v=u(e(94993)),m=u(e(73808)),b=u(e(38416)),N=e(40477),D=r(e(23898)),H=e(8951);function x(S){var L=w();return function(){var T=(0,m.default)(S),s;if(L){var l=(0,m.default)(this).constructor;s=Reflect.construct(T,arguments,l)}else s=T.apply(this,arguments);return(0,v.default)(this,s)}}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var O=function(S){(0,c.default)(I,S);var L=x(I);function I(T){var s,l=T.address,h=T.sybmol,E=T.amount;return(0,i.default)(this,I),s=L.call(this),(0,b.default)((0,a.default)(s),"from",void 0),(0,b.default)((0,a.default)(s),"symbol",void 0),(0,b.default)((0,a.default)(s),"amount",void 0),s.from=l,s.symbol=h,s.amount=E,s}return(0,g.default)(I,[{key:"getSignMsg",value:function(){var s={from:this.from,symbol:this.symbol,amount:this.amount};return s}},{key:"getMsg",value:function(){var s={from:D.decodeAddress(this.from),symbol:this.symbol,amount:this.amount,aminoPrefix:H.AminoPrefix.UnfreezeMsg};return s}}],[{key:"defaultMsg",value:function(){return{from:p.from(""),symbol:"",amount:0,aminoPrefix:H.AminoPrefix.UnfreezeMsg}}}]),I}(N.BaseMsg);f.UnFreezeTokenMsg=O},86057:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.SubmitProposalMsg=f.OrderBook=f.OrderBookLevel=f.TradingPair=f.OpenOrder=f.TokenBalance=f.AppAccount=f.BaseAccount=f.TokenOfList=f.Token=void 0;var u=r(e(56690)),i=r(e(38416)),g=e(8951),a=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"aminoPrefix",g.AminoPrefix.BnbchainToken),(0,i.default)(this,"name",void 0),(0,i.default)(this,"symbol",void 0),(0,i.default)(this,"original_symbol",void 0),(0,i.default)(this,"total_supply",void 0),(0,i.default)(this,"owner",void 0),(0,i.default)(this,"mintable",void 0),this.name=S.name||"",this.symbol=S.symbol||"",this.original_symbol=S.original_symbol||"",this.total_supply=S.total_supply||0,this.owner=S.owner||p.alloc(0),this.mintable=S.mintable||!1};f.Token=a;var c=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"name",void 0),(0,i.default)(this,"symbol",void 0),(0,i.default)(this,"original_symbol",void 0),(0,i.default)(this,"total_supply",void 0),(0,i.default)(this,"owner",void 0),(0,i.default)(this,"mintable",void 0),this.name=S.name||"",this.symbol=S.symbol||"",this.original_symbol=S.original_symbol||"",this.total_supply=S.total_supply||0,this.owner=S.owner||p.alloc(0),this.mintable=S.mintable||!1};f.TokenOfList=c;var v=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"address",void 0),(0,i.default)(this,"coins",void 0),(0,i.default)(this,"public_key",void 0),(0,i.default)(this,"account_number",void 0),(0,i.default)(this,"sequence",void 0),this.address=S.address||p.alloc(0),this.coins=S.coins||[{denom:"",amount:0}],this.public_key=S.public_key||p.alloc(0),this.account_number=S.account_number||0,this.sequence=S.sequence||0};f.BaseAccount=v;var m=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"aminoPrefix",g.AminoPrefix.BnbchainAccount),(0,i.default)(this,"base",void 0),(0,i.default)(this,"name",void 0),(0,i.default)(this,"locked",void 0),(0,i.default)(this,"frozen",void 0),this.base=S.base||new v,this.name=S.name||"",this.locked=S.locked||[{denom:"",amount:0}],this.frozen=S.frozen||[{denom:"",amount:0}]};f.AppAccount=m;var b=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"symbol",void 0),(0,i.default)(this,"free",void 0),(0,i.default)(this,"locked",void 0),(0,i.default)(this,"frozen",void 0),this.symbol=S.symbol||"",this.free=S.free||0,this.locked=S.locked||0,this.frozen=S.frozen||0};f.TokenBalance=b;var N=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"id",void 0),(0,i.default)(this,"symbol",void 0),(0,i.default)(this,"price",void 0),(0,i.default)(this,"quantity",void 0),(0,i.default)(this,"cumQty",void 0),(0,i.default)(this,"createdHeight",void 0),(0,i.default)(this,"createdTimestamp",void 0),(0,i.default)(this,"lastUpdatedHeight",void 0),(0,i.default)(this,"lastUpdatedTimestamp",void 0),this.id=S.id||"",this.symbol=S.symbol||"",this.price=S.price||0,this.quantity=S.quantity||0,this.cumQty=S.cumQty||0,this.createdHeight=S.createdHeight||0,this.createdTimestamp=S.createdTimestamp||0,this.lastUpdatedHeight=S.lastUpdatedHeight||0,this.lastUpdatedTimestamp=S.lastUpdatedTimestamp||0};f.OpenOrder=N;var D=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"base_asset_symbol",void 0),(0,i.default)(this,"quote_asset_symbol",void 0),(0,i.default)(this,"list_price",void 0),(0,i.default)(this,"tick_size",void 0),(0,i.default)(this,"lot_size",void 0),this.base_asset_symbol=S.base_asset_symbol||"",this.quote_asset_symbol=S.quote_asset_symbol||"",this.list_price=S.list_price||0,this.tick_size=S.tick_size||0,this.lot_size=S.lot_size||0};f.TradingPair=D;var H=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"buyQty",void 0),(0,i.default)(this,"buyPrice",void 0),(0,i.default)(this,"sellQty",void 0),(0,i.default)(this,"sellPrice",void 0),this.buyQty=S.buyQty||0,this.buyPrice=S.buyPrice||0,this.sellQty=S.sellQty||0,this.sellPrice=S.sellPrice||0};f.OrderBookLevel=H;var x=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"height",void 0),(0,i.default)(this,"levels",void 0),this.height=S.height||0,this.levels=S.levels||[new H]};f.OrderBook=x;var w=function O(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.default)(this,O),(0,i.default)(this,"aminoPrefix",g.AminoPrefix.MsgSubmitProposal),(0,i.default)(this,"title",void 0),(0,i.default)(this,"description",void 0),(0,i.default)(this,"proposal_type",void 0),(0,i.default)(this,"proposer",void 0),(0,i.default)(this,"initial_deposit",void 0),(0,i.default)(this,"voting_period",void 0),S=S||{},this.title=S.title||"",this.description=S.description||"",this.proposal_type=S.proposal_type||0,this.proposer=S.proposer||p.alloc(0),this.initial_deposit=S.initial_deposit||[],this.voting_period=S.voting_period||0};f.SubmitProposalMsg=w},72702:function(){"use strict"},8951:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(72702);Object.keys(p).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return p[i]}})});var r=e(82087);Object.keys(r).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return r[i]}})});var u=e(68703);Object.keys(u).forEach(function(i){i==="default"||i==="__esModule"||Object.defineProperty(f,i,{enumerable:!0,get:function(){return u[i]}})})},82087:function(G,f){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.AminoPrefix=void 0;var e;f.AminoPrefix=e,function(p){p.MsgSend="2A2C87FA",p.NewOrderMsg="CE6DC043",p.CancelOrderMsg="166E681B",p.IssueMsg="17EFAB80",p.BurnMsg="7ED2D2A0",p.FreezeMsg="E774B32D",p.UnfreezeMsg="6515FF0D",p.MintMsg="467E0829",p.ListMsg="B41DE13F",p.StdTx="F0625DEE",p.PubKeySecp256k1="EB5AE987",p.SignatureSecp256k1="7FC4A495",p.MsgSubmitProposal="B42D614E",p.MsgDeposit="A18A56E5",p.MsgVote="A1CADD36",p.TimeLockMsg="07921531",p.TimeUnlockMsg="C4050C6C",p.TimeRelockMsg="504711DA",p.HTLTMsg="B33F9A24",p.DepositHTLTMsg="63986496",p.ClaimHTLTMsg="C1665300",p.RefundHTLTMsg="3454A27C",p.SetAccountFlagsMsg="BEA6E301",p.BnbchainAccount="4BDC4C27",p.BnbchainToken="140364E6",p.MsgCreateValidator="EB361D01",p.MsgRemoveValidator="C1AFE85F",p.MsgCreateValidatorProposal="DB6A19FD",p.MsgEditValidator="C2E8BCCD",p.MsgDelegate="921D2E4E",p.MsgBeginUnbonding="A3823C9A",p.MsgBeginRedelegate="267996D2",p.MsgCreateSideChainValidator="D17201E5",p.MsgEditSideChainValidator="264CC57B",p.MsgSideChainDelegate="E3A07FD2",p.MsgSideChainRedelegate="E3CED364",p.MsgSideChainUndelegate="514F7E0E",p.Claim="4E781C11",p.ClaimMsg="175A0521",p.BindMsg="B9AE640C",p.TransferOutMsg="800819C0",p.IssueMiniMsg="A3F16C41",p.IssueTinyMsg="ED2832D4",p.SetURIMsg="7B1D34E7",p.ListMiniMsg="4C264019",p.MiniToken="E0051C20"}(e||(f.AminoPrefix=e={}))},68703:function(){"use strict"},66283:function(G,f,e){"use strict";var p=e(48764).Buffer,r=e(75263),u=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.calculateSwapID=f.calculateRandomNumberHash=f.sha3=f.sha256=f.sha256ripemd160=f.ensureHex=f.isHex=f.reverseHex=f.reverseArray=f.hexXor=f.num2VarInt=f.num2hexstring=f.int2hex=f.hexstring2str=f.str2hexstring=f.ab2hexstring=f.hexstring2ab=f.str2ab=f.ab2str=void 0;var i=u(e(18698)),g=u(e(63465)),a=u(e(30706)),c=u(e(52153)),v=u(e(13327)),m=r(e(23898)),b=function(M){for(var U=[],z=0,V=M.length;z<V;z++)U.push(M[z]);String.fromCharCode.apply(null,U)};f.ab2str=b;var N=function(M){if(typeof M!="string")throw new Error("str2ab expects a string");for(var U=new Uint8Array(M.length),z=0,V=M.length;z<V;z++)U[z]=M.charCodeAt(z);return U};f.str2ab=N;var D=function(M){if(E(M),!M.length)return new Uint8Array;for(var U=M.length/2,z=new Uint8Array(U),V=0;V<U;V++)z[V]=parseInt(M.substring(0,2),16),M=M.substring(2);return z};f.hexstring2ab=D;var H=function(M){if((0,i.default)(M)!=="object")throw new Error("ab2hexstring expects an array");for(var U="",z=0;z<M.length;z++){var V=M[z].toString(16);V=V.length===0?"00":V.length===1?"0"+V:V,U+=V}return U};f.ab2hexstring=H;var x=function(M){return H(N(M))};f.str2hexstring=x;var w=function(M){return b(D(M))};f.hexstring2str=w;var O=function(M){if(typeof M!="number")throw new Error("int2hex expects a number");var U=M.toString(16);return U.length%2?"0"+U:U};f.int2hex=O;var S=function(M){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof M!="number")throw new Error("num must be numeric");if(M<0)throw new RangeError("num is unsigned (>= 0)");if(U%1!==0)throw new Error("size must be a whole integer");if(!Number.isSafeInteger(M))throw new RangeError("num (".concat(M,") must be a safe integer"));U=U*2;var V=M.toString(16);return V=V.length%U===0?V:("0".repeat(U)+V).substring(V.length),z&&(V=s(V)),V};f.num2hexstring=S;var L=function(M){return M<253?S(M):M<=65535?"fd"+S(M,2,!0):M<=4294967295?"fe"+S(M,4,!0):"ff"+S(M,8,!0)};f.num2VarInt=L;var I=function(M,U){if(E(M),E(U),M.length!==U.length)throw new Error("strings are disparate lengths");for(var z=[],V=0;V<M.length;V+=2)z.push(parseInt(M.substr(V,2),16)^parseInt(U.substr(V,2),16));return H(z)};f.hexXor=I;var T=function(M){if((0,i.default)(M)!=="object"||!M.length)throw new Error("reverseArray expects an array");for(var U=new Uint8Array(M.length),z=0;z<M.length;z++)U[z]=M[M.length-1-z];return U};f.reverseArray=T;var s=function(M){E(M);for(var U="",z=M.length-2;z>=0;z-=2)U+=M.substr(z,2);return U};f.reverseHex=s;var l=/^([0-9A-Fa-f]{2})*$/,h=function(M){try{return l.test(M)}catch{return!1}};f.isHex=h;var E=function(M){if(!h(M))throw new Error("Expected a hexstring but got ".concat(M))};f.ensureHex=E;var j=function(M){if(typeof M!="string")throw new Error("sha256ripemd160 expects a string");if(M.length%2!==0)throw new Error("invalid hex string length: ".concat(M));var U=g.default.parse(M),z=(0,c.default)(U);return(0,a.default)(z).toString()};f.sha256ripemd160=j;var F=function(M){if(typeof M!="string")throw new Error("sha256 expects a hex string");if(M.length%2!==0)throw new Error("invalid hex string length: ".concat(M));var U=g.default.parse(M);return(0,c.default)(U).toString()};f.sha256=F;var W=function(M){if(typeof M!="string")throw new Error("sha3 expects a hex string");if(M.length%2!==0)throw new Error("invalid hex string length: ".concat(M));var U=g.default.parse(M);return(0,v.default)(U).toString()};f.sha3=W;var d=function(M,U){for(var z=U.toString(16),V=z,Q=0;Q<16-z.length;Q++)V="0"+V;var Z=p.from(V,"hex"),J=p.concat([p.from(M,"hex"),Z]);return F(J.toString("hex"))};f.calculateRandomNumberHash=d;var A=function(M,U,z){var V=p.from(M,"hex"),Q=m.decodeAddress(U),Z=p.from(z.toLowerCase(),"utf8"),J=p.concat([V,Q,Z]);return F(J.toString("hex"))};f.calculateSwapID=A},10881:function(G,f,e){"use strict";var p=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.size=f.default=void 0;var r=p(e(94315)),u=function(a){if(r.default.boolean(a))return 0;if(r.default.number(a))return r.default.integer(a)?0:1;if(r.default.string(a)||r.default.array(a)||r.default.object(a))return 2;throw new Error('Invalid type "'.concat(a,'"'))};f.default=u;var i=function(a,c,v){v===void 0&&(v=0);for(var m=0;m<a.length;++m)v+=c(a[m],m,v);return v};f.size=i},20723:function(G,f,e){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var p=e(66283);Object.keys(p).forEach(function(a){a==="default"||a==="__esModule"||Object.defineProperty(f,a,{enumerable:!0,get:function(){return p[a]}})});var r=e(10881);Object.keys(r).forEach(function(a){a==="default"||a==="__esModule"||Object.defineProperty(f,a,{enumerable:!0,get:function(){return r[a]}})});var u=e(72731);Object.keys(u).forEach(function(a){a==="default"||a==="__esModule"||Object.defineProperty(f,a,{enumerable:!0,get:function(){return u[a]}})});var i=e(75838);Object.keys(i).forEach(function(a){a==="default"||a==="__esModule"||Object.defineProperty(f,a,{enumerable:!0,get:function(){return i[a]}})});var g=e(33021);Object.keys(g).forEach(function(a){a==="default"||a==="__esModule"||Object.defineProperty(f,a,{enumerable:!0,get:function(){return g[a]}})})},33021:function(G,f,e){"use strict";var p=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.default=f.HttpRequest=void 0;var r=p(e(56690)),u=p(e(89728)),i=p(e(38416)),g=p(e(9669));function a(b,N){var D=Object.keys(b);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(b);N&&(H=H.filter(function(x){return Object.getOwnPropertyDescriptor(b,x).enumerable})),D.push.apply(D,H)}return D}function c(b){for(var N=1;N<arguments.length;N++){var D=arguments[N]!=null?arguments[N]:{};N%2?a(Object(D),!0).forEach(function(H){(0,i.default)(b,H,D[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(D)):a(Object(D)).forEach(function(H){Object.defineProperty(b,H,Object.getOwnPropertyDescriptor(D,H))})}return b}var v=function(){function b(N){(0,r.default)(this,b),(0,i.default)(this,"httpClient",void 0),this.httpClient=g.default.create({baseURL:N})}return(0,u.default)(b,[{key:"get",value:function(D,H,x){return this.request("get",D,H,x)}},{key:"post",value:function(D,H,x){return this.request("post",D,H,x)}},{key:"request",value:function(D,H,x){var w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},O=c({method:D,url:H},w);return x&&(D==="get"?O.params=x:O.data=x),this.httpClient.request(O).then(function(S){return{result:S.data,status:S.status}}).catch(function(S){var L=S;try{var I=S.response&&S.response.data;L=new Error(I.message),L.code=I.code}catch{throw L}throw L})}}]),b}();f.HttpRequest=v;var m=v;f.default=m},75838:function(G,f,e){"use strict";var p=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.getMsgByAminoPrefix=f.convertObjectArrayNum=f.divide=f.BASENUMBER=void 0;var r=p(e(93302)),u=e(54684),i=Math.pow(10,8);f.BASENUMBER=i;var g=function(m){return+new r.default(m).div(i).toString()};f.divide=g;var a=function(m,b){m.forEach(function(N){b.forEach(function(D){N[D]=g(N[D])})})};f.convertObjectArrayNum=a;var c=function(m){switch(m.toUpperCase()){case u.AminoPrefix.NewOrderMsg:return u.NewOrderMsg;case u.AminoPrefix.CancelOrderMsg:return u.CancelOrderMsg;case u.AminoPrefix.MsgSend:return u.SendMsg;case u.AminoPrefix.IssueMsg:return u.IssueTokenMsg;case u.AminoPrefix.FreezeMsg:return u.FreezeTokenMsg;case u.AminoPrefix.UnfreezeMsg:return u.UnFreezeTokenMsg;case u.AminoPrefix.BurnMsg:return u.BurnTokenMsg;case u.AminoPrefix.MintMsg:return u.MintTokenMsg;case u.AminoPrefix.TimeLockMsg:return u.TimeLockMsg;case u.AminoPrefix.TimeRelockMsg:return u.TimeReLockMsg;case u.AminoPrefix.TimeUnlockMsg:return u.TimeUnlockMsg;default:return u.BaseMsg}};f.getMsgByAminoPrefix=c},72731:function(G,f,e){"use strict";var p=e(64836);Object.defineProperty(f,"__esModule",{value:!0}),f.validateOffsetLimit=f.validateTradingPair=f.validateSymbol=f.checkCoins=f.checkNumber=void 0;var r=p(e(93302)),u=Math.pow(2,63),i=function(b){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"input number";if(new r.default(b).lte(0))throw new Error("".concat(N," should be a positive number"));if(new r.default(b).gte(u))throw new Error("".concat(N," should be less than 2^63"))};f.checkNumber=i;var g=function(b){b=b||[],b.forEach(function(N){if(i(N.amount),!N.denom)throw new Error("invalid denmon")})};f.checkCoins=g;var a=function(b){if(!b)throw new Error("suffixed token symbol cannot be empty");var N=b.split("-");if(!/^[a-zA-z\d/.]{3,10}$/.test(N[0]))throw new Error("symbol length is limited to 3~10")};f.validateSymbol=a;var c=function(b){var N=b.split("_");if(N.length!==2)throw new Error('the pair should in format "symbol1_symbol2"');a(N[0]),a(N[1])};f.validateTradingPair=c;var v=function(b,N){if(b<0)throw new Error("offset can't be less than 0");if(N<0)throw new Error("limit can't be less than 0")};f.validateOffsetLimit=v},53732:function(G,f,e){"use strict";var p,r=e(48764).Buffer;p={value:!0},f.n=void 0;var u=e(76358),i=e(81580),g=e(28716);const a=5,c=v=>i.Observable.create(m=>{let b=0,N=0,D=r.alloc(0);const H=v.subscribe({complete:()=>{m.error(new u.DisconnectedDevice),H.unsubscribe()},error:x=>{(0,g.log)("ble-error","in receiveAPDU "+String(x)),m.error(x),H.unsubscribe()},next:x=>{const w=x.readUInt8(0),O=x.readUInt16BE(1);let S=x.slice(3);if(w!==a){m.error(new u.TransportError("Invalid tag "+w.toString(16),"InvalidTag"));return}if(b!==O){m.error(new u.TransportError("BLE: Invalid sequence number. discontinued chunk. Received "+O+" but expected "+b,"InvalidSequence"));return}if(O===0&&(N=S.readUInt16BE(0),S=S.slice(2)),b++,D=r.concat([D,S]),D.length>N){m.error(new u.TransportError("BLE: received too much data. discontinued chunk. Received "+D.length+" but expected "+N,"BLETooMuchData"));return}D.length===N&&(m.next(D),m.complete(),H.unsubscribe())}});return()=>{H.unsubscribe()}});f.n=c},37741:function(G,f,e){"use strict";var p,r=e(48764).Buffer;p={value:!0},f.o=void 0;var u=e(81580),i=e(28716);const g=5;function a(v,m){const b=[];for(let N=0,D=m(0);N<v.length;N+=D,D=m(N))b.push(v.slice(N,N+D));return b}const c=(v,m,b)=>{const N=a(m,D=>b-(D===0?5:3)).map((D,H)=>{const x=r.alloc(H===0?5:3);return x.writeUInt8(g,0),x.writeUInt16BE(H,1),H===0&&x.writeUInt16BE(m.length,3),r.concat([x,D])});return u.Observable.create(D=>{let H=!1;async function x(){for(const O of N){if(H)return;await v(O)}}return x().then(()=>{H=!0,D.complete()},O=>{H=!0,(0,i.log)("ble-error","sendAPDU failure "+String(O)),D.error(O)}),()=>{H||((0,i.log)("ble-verbose","sendAPDU interruption"),H=!0)}})};f.o=c},81580:function(G,f,e){"use strict";e.r(f),e.d(f,{ArgumentOutOfRangeError:function(){return Yt},AsyncSubject:function(){return Ze},BehaviorSubject:function(){return yt},ConnectableObservable:function(){return Ie},EMPTY:function(){return We},EmptyError:function(){return Zt},GroupedObservable:function(){return Ye},NEVER:function(){return Fr},Notification:function(){return at},NotificationKind:function(){return it},ObjectUnsubscribedError:function(){return Te},Observable:function(){return fe},ReplaySubject:function(){return jt},Scheduler:function(){return tt},Subject:function(){return je},Subscriber:function(){return X},Subscription:function(){return V},TimeoutError:function(){return cr},UnsubscriptionError:function(){return z},VirtualAction:function(){return Ot},VirtualTimeScheduler:function(){return Le},animationFrame:function(){return Ne},animationFrameScheduler:function(){return Be},asap:function(){return ht},asapScheduler:function(){return st},async:function(){return Oe},asyncScheduler:function(){return de},bindCallback:function(){return dr},bindNodeCallback:function(){return Jt},combineLatest:function(){return wr},concat:function(){return _},config:function(){return W},defer:function(){return ae},empty:function(){return Ve},forkJoin:function(){return ve},from:function(){return ke},fromEvent:function(){return Ce},fromEventPattern:function(){return ze},generate:function(){return Rr},identity:function(){return ne},iif:function(){return kr},interval:function(){return $r},isObservable:function(){return or},merge:function(){return Hr},never:function(){return Wr},noop:function(){return ot},observable:function(){return se},of:function(){return nt},onErrorResumeNext:function(){return Ir},pairs:function(){return Vr},partition:function(){return Qr},pipe:function(){return be},queue:function(){return bt},queueScheduler:function(){return ct},race:function(){return Zr},range:function(){return qr},scheduled:function(){return nr},throwError:function(){return wt},timer:function(){return tn},using:function(){return nn},zip:function(){return an}});/*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */var p=function(n,o){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,y){t.__proto__=y}||function(t,y){for(var R in y)y.hasOwnProperty(R)&&(t[R]=y[R])},p(n,o)};function r(n,o){p(n,o);function t(){this.constructor=n}n.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}var u=function(){return u=Object.assign||function(o){for(var t,y=1,R=arguments.length;y<R;y++){t=arguments[y];for(var $ in t)Object.prototype.hasOwnProperty.call(t,$)&&(o[$]=t[$])}return o},u.apply(this,arguments)};function i(n,o){var t={};for(var y in n)Object.prototype.hasOwnProperty.call(n,y)&&o.indexOf(y)<0&&(t[y]=n[y]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,y=Object.getOwnPropertySymbols(n);R<y.length;R++)o.indexOf(y[R])<0&&Object.prototype.propertyIsEnumerable.call(n,y[R])&&(t[y[R]]=n[y[R]]);return t}function g(n,o,t,y){var R=arguments.length,$=R<3?o:y===null?y=Object.getOwnPropertyDescriptor(o,t):y,ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(n,o,t,y);else for(var ie=n.length-1;ie>=0;ie--)(ee=n[ie])&&($=(R<3?ee($):R>3?ee(o,t,$):ee(o,t))||$);return R>3&&$&&Object.defineProperty(o,t,$),$}function a(n,o){return function(t,y){o(t,y,n)}}function c(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)}function v(n,o,t,y){function R($){return $ instanceof t?$:new t(function(ee){ee($)})}return new(t||(t=Promise))(function($,ee){function ie(ge){try{ue(y.next(ge))}catch(me){ee(me)}}function oe(ge){try{ue(y.throw(ge))}catch(me){ee(me)}}function ue(ge){ge.done?$(ge.value):R(ge.value).then(ie,oe)}ue((y=y.apply(n,o||[])).next())})}function m(n,o){var t={label:0,sent:function(){if($[0]&1)throw $[1];return $[1]},trys:[],ops:[]},y,R,$,ee;return ee={next:ie(0),throw:ie(1),return:ie(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function ie(ue){return function(ge){return oe([ue,ge])}}function oe(ue){if(y)throw new TypeError("Generator is already executing.");for(;t;)try{if(y=1,R&&($=ue[0]&2?R.return:ue[0]?R.throw||(($=R.return)&&$.call(R),0):R.next)&&!($=$.call(R,ue[1])).done)return $;switch(R=0,$&&(ue=[ue[0]&2,$.value]),ue[0]){case 0:case 1:$=ue;break;case 4:return t.label++,{value:ue[1],done:!1};case 5:t.label++,R=ue[1],ue=[0];continue;case 7:ue=t.ops.pop(),t.trys.pop();continue;default:if($=t.trys,!($=$.length>0&&$[$.length-1])&&(ue[0]===6||ue[0]===2)){t=0;continue}if(ue[0]===3&&(!$||ue[1]>$[0]&&ue[1]<$[3])){t.label=ue[1];break}if(ue[0]===6&&t.label<$[1]){t.label=$[1],$=ue;break}if($&&t.label<$[2]){t.label=$[2],t.ops.push(ue);break}$[2]&&t.ops.pop(),t.trys.pop();continue}ue=o.call(n,t)}catch(ge){ue=[6,ge],R=0}finally{y=$=0}if(ue[0]&5)throw ue[1];return{value:ue[0]?ue[1]:void 0,done:!0}}}function b(n,o,t,y){y===void 0&&(y=t),n[y]=o[t]}function N(n,o){for(var t in n)t!=="default"&&!o.hasOwnProperty(t)&&(o[t]=n[t])}function D(n){var o=typeof Symbol=="function"&&Symbol.iterator,t=o&&n[o],y=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")}function H(n,o){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var y=t.call(n),R,$=[],ee;try{for(;(o===void 0||o-- >0)&&!(R=y.next()).done;)$.push(R.value)}catch(ie){ee={error:ie}}finally{try{R&&!R.done&&(t=y.return)&&t.call(y)}finally{if(ee)throw ee.error}}return $}function x(){for(var n=[],o=0;o<arguments.length;o++)n=n.concat(H(arguments[o]));return n}function w(){for(var n=0,o=0,t=arguments.length;o<t;o++)n+=arguments[o].length;for(var y=Array(n),R=0,o=0;o<t;o++)for(var $=arguments[o],ee=0,ie=$.length;ee<ie;ee++,R++)y[R]=$[ee];return y}function O(n){return this instanceof O?(this.v=n,this):new O(n)}function S(n,o,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var y=t.apply(n,o||[]),R,$=[];return R={},ee("next"),ee("throw"),ee("return"),R[Symbol.asyncIterator]=function(){return this},R;function ee(he){y[he]&&(R[he]=function(Ue){return new Promise(function($t,fn){$.push([he,Ue,$t,fn])>1||ie(he,Ue)})})}function ie(he,Ue){try{oe(y[he](Ue))}catch($t){me($[0][3],$t)}}function oe(he){he.value instanceof O?Promise.resolve(he.value.v).then(ue,ge):me($[0][2],he)}function ue(he){ie("next",he)}function ge(he){ie("throw",he)}function me(he,Ue){he(Ue),$.shift(),$.length&&ie($[0][0],$[0][1])}}function L(n){var o,t;return o={},y("next"),y("throw",function(R){throw R}),y("return"),o[Symbol.iterator]=function(){return this},o;function y(R,$){o[R]=n[R]?function(ee){return(t=!t)?{value:O(n[R](ee)),done:R==="return"}:$?$(ee):ee}:$}}function I(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n[Symbol.asyncIterator],t;return o?o.call(n):(n=typeof D=="function"?D(n):n[Symbol.iterator](),t={},y("next"),y("throw"),y("return"),t[Symbol.asyncIterator]=function(){return this},t);function y($){t[$]=n[$]&&function(ee){return new Promise(function(ie,oe){ee=n[$](ee),R(ie,oe,ee.done,ee.value)})}}function R($,ee,ie,oe){Promise.resolve(oe).then(function(ue){$({value:ue,done:ie})},ee)}}function T(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n}function s(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var t in n)Object.hasOwnProperty.call(n,t)&&(o[t]=n[t]);return o.default=n,o}function l(n){return n&&n.__esModule?n:{default:n}}function h(n,o){if(!o.has(n))throw new TypeError("attempted to get private field on non-instance");return o.get(n)}function E(n,o,t){if(!o.has(n))throw new TypeError("attempted to set private field on non-instance");return o.set(n,t),t}function j(n){return typeof n=="function"}var F=!1,W={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){var o=new Error;""+o.stack}F=n},get useDeprecatedSynchronousErrorHandling(){return F}};function d(n){setTimeout(function(){throw n},0)}var A={closed:!0,next:function(n){},error:function(n){if(W.useDeprecatedSynchronousErrorHandling)throw n;d(n)},complete:function(){}},k=function(){return Array.isArray||function(n){return n&&typeof n.length=="number"}}();function M(n){return n!==null&&typeof n=="object"}var U=function(){function n(o){return Error.call(this),this.message=o?o.length+` errors occurred during unsubscription:
15
+ `+o.map(function(t,y){return y+1+") "+t.toString()}).join(`
16
+ `):"",this.name="UnsubscriptionError",this.errors=o,this}return n.prototype=Object.create(Error.prototype),n}(),z=U,V=function(){function n(o){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,o&&(this._ctorUnsubscribe=!0,this._unsubscribe=o)}return n.prototype.unsubscribe=function(){var o;if(!this.closed){var t=this,y=t._parentOrParents,R=t._ctorUnsubscribe,$=t._unsubscribe,ee=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,y instanceof n)y.remove(this);else if(y!==null)for(var ie=0;ie<y.length;++ie){var oe=y[ie];oe.remove(this)}if(j($)){R&&(this._unsubscribe=void 0);try{$.call(this)}catch(me){o=me instanceof z?Q(me.errors):[me]}}if(k(ee))for(var ie=-1,ue=ee.length;++ie<ue;){var ge=ee[ie];if(M(ge))try{ge.unsubscribe()}catch(he){o=o||[],he instanceof z?o=o.concat(Q(he.errors)):o.push(he)}}if(o)throw new z(o)}},n.prototype.add=function(o){var t=o;if(!o)return n.EMPTY;switch(typeof o){case"function":t=new n(o);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof n)){var y=t;t=new n,t._subscriptions=[y]}break;default:throw new Error("unrecognized teardown "+o+" added to Subscription.")}var R=t._parentOrParents;if(R===null)t._parentOrParents=this;else if(R instanceof n){if(R===this)return t;t._parentOrParents=[R,this]}else if(R.indexOf(this)===-1)R.push(this);else return t;var $=this._subscriptions;return $===null?this._subscriptions=[t]:$.push(t),t},n.prototype.remove=function(o){var t=this._subscriptions;if(t){var y=t.indexOf(o);y!==-1&&t.splice(y,1)}},n.EMPTY=function(o){return o.closed=!0,o}(new n),n}();function Q(n){return n.reduce(function(o,t){return o.concat(t instanceof z?t.errors:t)},[])}var Z=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),J=null,X=function(n){r(o,n);function o(t,y,R){var $=n.call(this)||this;switch($.syncErrorValue=null,$.syncErrorThrown=!1,$.syncErrorThrowable=!1,$.isStopped=!1,arguments.length){case 0:$.destination=A;break;case 1:if(!t){$.destination=A;break}if(typeof t=="object"){t instanceof o?($.syncErrorThrowable=t.syncErrorThrowable,$.destination=t,t.add($)):($.syncErrorThrowable=!0,$.destination=new q($,t));break}default:$.syncErrorThrowable=!0,$.destination=new q($,t,y,R);break}return $}return o.prototype[Z]=function(){return this},o.create=function(t,y,R){var $=new o(t,y,R);return $.syncErrorThrowable=!1,$},o.prototype.next=function(t){this.isStopped||this._next(t)},o.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},o.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},o.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this))},o.prototype._next=function(t){this.destination.next(t)},o.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},o.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},o.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},o}(V),q=function(n){r(o,n);function o(t,y,R,$){var ee=n.call(this)||this;ee._parentSubscriber=t;var ie,oe=ee;return j(y)?ie=y:y&&(ie=y.next,R=y.error,$=y.complete,y!==A&&(oe=Object.create(y),j(oe.unsubscribe)&&ee.add(oe.unsubscribe.bind(oe)),oe.unsubscribe=ee.unsubscribe.bind(ee))),ee._context=oe,ee._next=ie,ee._error=R,ee._complete=$,ee}return o.prototype.next=function(t){if(!this.isStopped&&this._next){var y=this._parentSubscriber;!W.useDeprecatedSynchronousErrorHandling||!y.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(y,this._next,t)&&this.unsubscribe()}},o.prototype.error=function(t){if(!this.isStopped){var y=this._parentSubscriber,R=W.useDeprecatedSynchronousErrorHandling;if(this._error)!R||!y.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(y,this._error,t),this.unsubscribe());else if(y.syncErrorThrowable)R?(y.syncErrorValue=t,y.syncErrorThrown=!0):d(t),this.unsubscribe();else{if(this.unsubscribe(),R)throw t;d(t)}}},o.prototype.complete=function(){var t=this;if(!this.isStopped){var y=this._parentSubscriber;if(this._complete){var R=function(){return t._complete.call(t._context)};!W.useDeprecatedSynchronousErrorHandling||!y.syncErrorThrowable?(this.__tryOrUnsub(R),this.unsubscribe()):(this.__tryOrSetError(y,R),this.unsubscribe())}else this.unsubscribe()}},o.prototype.__tryOrUnsub=function(t,y){try{t.call(this._context,y)}catch(R){if(this.unsubscribe(),W.useDeprecatedSynchronousErrorHandling)throw R;d(R)}},o.prototype.__tryOrSetError=function(t,y,R){if(!W.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{y.call(this._context,R)}catch($){return W.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=$,t.syncErrorThrown=!0,!0):(d($),!0)}return!1},o.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},o}(X);function te(n){for(;n;){var o=n,t=o.closed,y=o.destination,R=o.isStopped;if(t||R)return!1;y&&y instanceof X?n=y:n=null}return!0}function re(n,o,t){if(n){if(n instanceof X)return n;if(n[Z])return n[Z]()}return!n&&!o&&!t?new X(A):new X(n,o,t)}var se=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ne(n){return n}function be(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return le(n)}function le(n){return n.length===0?ne:n.length===1?n[0]:function(t){return n.reduce(function(y,R){return R(y)},t)}}var fe=function(){function n(o){this._isScalar=!1,o&&(this._subscribe=o)}return n.prototype.lift=function(o){var t=new n;return t.source=this,t.operator=o,t},n.prototype.subscribe=function(o,t,y){var R=this.operator,$=re(o,t,y);if(R?$.add(R.call($,this.source)):$.add(this.source||W.useDeprecatedSynchronousErrorHandling&&!$.syncErrorThrowable?this._subscribe($):this._trySubscribe($)),W.useDeprecatedSynchronousErrorHandling&&$.syncErrorThrowable&&($.syncErrorThrowable=!1,$.syncErrorThrown))throw $.syncErrorValue;return $},n.prototype._trySubscribe=function(o){try{return this._subscribe(o)}catch(t){W.useDeprecatedSynchronousErrorHandling&&(o.syncErrorThrown=!0,o.syncErrorValue=t),te(o)?o.error(t):console.warn(t)}},n.prototype.forEach=function(o,t){var y=this;return t=ce(t),new t(function(R,$){var ee;ee=y.subscribe(function(ie){try{o(ie)}catch(oe){$(oe),ee&&ee.unsubscribe()}},$,R)})},n.prototype._subscribe=function(o){var t=this.source;return t&&t.subscribe(o)},n.prototype[se]=function(){return this},n.prototype.pipe=function(){for(var o=[],t=0;t<arguments.length;t++)o[t]=arguments[t];return o.length===0?this:le(o)(this)},n.prototype.toPromise=function(o){var t=this;return o=ce(o),new o(function(y,R){var $;t.subscribe(function(ee){return $=ee},function(ee){return R(ee)},function(){return y($)})})},n.create=function(o){return new n(o)},n}();function ce(n){if(n||(n=W.Promise||Promise),!n)throw new Error("no Promise impl found");return n}var pe=function(){function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n}(),Te=pe,Ee=function(n){r(o,n);function o(t,y){var R=n.call(this)||this;return R.subject=t,R.subscriber=y,R.closed=!1,R}return o.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,y=t.observers;if(this.subject=null,!(!y||y.length===0||t.isStopped||t.closed)){var R=y.indexOf(this.subscriber);R!==-1&&y.splice(R,1)}}},o}(V),xe=function(n){r(o,n);function o(t){var y=n.call(this,t)||this;return y.destination=t,y}return o}(X),je=function(n){r(o,n);function o(){var t=n.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o.prototype[Z]=function(){return new xe(this)},o.prototype.lift=function(t){var y=new gt(this,this);return y.operator=t,y},o.prototype.next=function(t){if(this.closed)throw new Te;if(!this.isStopped)for(var y=this.observers,R=y.length,$=y.slice(),ee=0;ee<R;ee++)$[ee].next(t)},o.prototype.error=function(t){if(this.closed)throw new Te;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var y=this.observers,R=y.length,$=y.slice(),ee=0;ee<R;ee++)$[ee].error(t);this.observers.length=0},o.prototype.complete=function(){if(this.closed)throw new Te;this.isStopped=!0;for(var t=this.observers,y=t.length,R=t.slice(),$=0;$<y;$++)R[$].complete();this.observers.length=0},o.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},o.prototype._trySubscribe=function(t){if(this.closed)throw new Te;return n.prototype._trySubscribe.call(this,t)},o.prototype._subscribe=function(t){if(this.closed)throw new Te;return this.hasError?(t.error(this.thrownError),V.EMPTY):this.isStopped?(t.complete(),V.EMPTY):(this.observers.push(t),new Ee(this,t))},o.prototype.asObservable=function(){var t=new fe;return t.source=this,t},o.create=function(t,y){return new gt(t,y)},o}(fe),gt=function(n){r(o,n);function o(t,y){var R=n.call(this)||this;return R.destination=t,R.source=y,R}return o.prototype.next=function(t){var y=this.destination;y&&y.next&&y.next(t)},o.prototype.error=function(t){var y=this.destination;y&&y.error&&this.destination.error(t)},o.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},o.prototype._subscribe=function(t){var y=this.source;return y?this.source.subscribe(t):V.EMPTY},o}(je);function mt(){return function(o){return o.lift(new Pt(o))}}var Pt=function(){function n(o){this.connectable=o}return n.prototype.call=function(o,t){var y=this.connectable;y._refCount++;var R=new qe(o,y),$=t.subscribe(R);return R.closed||(R.connection=y.connect()),$},n}(),qe=function(n){r(o,n);function o(t,y){var R=n.call(this,t)||this;return R.connectable=y,R}return o.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var y=t._refCount;if(y<=0){this.connection=null;return}if(t._refCount=y-1,y>1){this.connection=null;return}var R=this.connection,$=t._connection;this.connection=null,$&&(!R||$===R)&&$.unsubscribe()},o}(X),Ie=function(n){r(o,n);function o(t,y){var R=n.call(this)||this;return R.source=t,R.subjectFactory=y,R._refCount=0,R._isComplete=!1,R}return o.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},o.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},o.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,t=this._connection=new V,t.add(this.source.subscribe(new et(this.getSubject(),this))),t.closed&&(this._connection=null,t=V.EMPTY)),t},o.prototype.refCount=function(){return mt()(this)},o}(fe),At=null,et=function(n){r(o,n);function o(t,y){var R=n.call(this,t)||this;return R.connectable=y,R}return o.prototype._error=function(t){this._unsubscribe(),n.prototype._error.call(this,t)},o.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),n.prototype._complete.call(this)},o.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var y=t._connection;t._refCount=0,t._subject=null,t._connection=null,y&&y.unsubscribe()}},o}(xe),ar=null,Pe=function(n){r(o,n);function o(t,y){var R=n.call(this,t)||this;return R.connectable=y,R}return o.prototype._unsubscribe=function(){var t=this.connectable;if(!t){this.connection=null;return}this.connectable=null;var y=t._refCount;if(y<=0){this.connection=null;return}if(t._refCount=y-1,y>1){this.connection=null;return}var R=this.connection,$=t._connection;this.connection=null,$&&(!R||$===R)&&$.unsubscribe()},o}(X);function Ct(n,o,t,y){return function(R){return R.lift(new Rt(n,o,t,y))}}var Rt=null,zt=function(n){r(o,n);function o(t,y,R,$,ee){var ie=n.call(this,t)||this;return ie.keySelector=y,ie.elementSelector=R,ie.durationSelector=$,ie.subjectSelector=ee,ie.groups=null,ie.attemptedToUnsubscribe=!1,ie.count=0,ie}return o.prototype._next=function(t){var y;try{y=this.keySelector(t)}catch(R){this.error(R);return}this._group(t,y)},o.prototype._group=function(t,y){var R=this.groups;R||(R=this.groups=new Map);var $=R.get(y),ee;if(this.elementSelector)try{ee=this.elementSelector(t)}catch(ue){this.error(ue)}else ee=t;if(!$){$=this.subjectSelector?this.subjectSelector():new je,R.set(y,$);var ie=new Ye(y,$,this);if(this.destination.next(ie),this.durationSelector){var oe=void 0;try{oe=this.durationSelector(new Ye(y,$))}catch(ue){this.error(ue);return}this.add(oe.subscribe(new Xe(y,$,this)))}}$.closed||$.next(ee)},o.prototype._error=function(t){var y=this.groups;y&&(y.forEach(function(R,$){R.error(t)}),y.clear()),this.destination.error(t)},o.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(y,R){y.complete()}),t.clear()),this.destination.complete()},o.prototype.removeGroup=function(t){this.groups.delete(t)},o.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,this.count===0&&n.prototype.unsubscribe.call(this))},o}(X),Xe=function(n){r(o,n);function o(t,y,R){var $=n.call(this,y)||this;return $.key=t,$.group=y,$.parent=R,$}return o.prototype._next=function(t){this.complete()},o.prototype._unsubscribe=function(){var t=this,y=t.parent,R=t.key;this.key=this.parent=null,y&&y.removeGroup(R)},o}(X),Ye=function(n){r(o,n);function o(t,y,R){var $=n.call(this)||this;return $.key=t,$.groupSubject=y,$.refCountSubscription=R,$}return o.prototype._subscribe=function(t){var y=new V,R=this,$=R.refCountSubscription,ee=R.groupSubject;return $&&!$.closed&&y.add(new Ht($)),y.add(ee.subscribe(t)),y},o}(fe),Ht=function(n){r(o,n);function o(t){var y=n.call(this)||this;return y.parent=t,t.count++,y}return o.prototype.unsubscribe=function(){var t=this.parent;!t.closed&&!this.closed&&(n.prototype.unsubscribe.call(this),t.count-=1,t.count===0&&t.attemptedToUnsubscribe&&t.unsubscribe())},o}(V),yt=function(n){r(o,n);function o(t){var y=n.call(this)||this;return y._value=t,y}return Object.defineProperty(o.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),o.prototype._subscribe=function(t){var y=n.prototype._subscribe.call(this,t);return y&&!y.closed&&t.next(this._value),y},o.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Te;return this._value},o.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},o}(je),Re=function(n){r(o,n);function o(t,y){return n.call(this)||this}return o.prototype.schedule=function(t,y){return y===void 0&&(y=0),this},o}(V),He=function(n){r(o,n);function o(t,y){var R=n.call(this,t,y)||this;return R.scheduler=t,R.work=y,R.pending=!1,R}return o.prototype.schedule=function(t,y){if(y===void 0&&(y=0),this.closed)return this;this.state=t;var R=this.id,$=this.scheduler;return R!=null&&(this.id=this.recycleAsyncId($,R,y)),this.pending=!0,this.delay=y,this.id=this.id||this.requestAsyncId($,this.id,y),this},o.prototype.requestAsyncId=function(t,y,R){return R===void 0&&(R=0),setInterval(t.flush.bind(t,this),R)},o.prototype.recycleAsyncId=function(t,y,R){if(R===void 0&&(R=0),R!==null&&this.delay===R&&this.pending===!1)return y;clearInterval(y)},o.prototype.execute=function(t,y){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var R=this._execute(t,y);if(R)return R;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},o.prototype._execute=function(t,y){var R=!1,$=void 0;try{this.work(t)}catch(ee){R=!0,$=!!ee&&ee||new Error(ee)}if(R)return this.unsubscribe(),$},o.prototype._unsubscribe=function(){var t=this.id,y=this.scheduler,R=y.actions,$=R.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,$!==-1&&R.splice($,1),t!=null&&(this.id=this.recycleAsyncId(y,t,null)),this.delay=null},o}(Re),xt=function(n){r(o,n);function o(t,y){var R=n.call(this,t,y)||this;return R.scheduler=t,R.work=y,R}return o.prototype.schedule=function(t,y){return y===void 0&&(y=0),y>0?n.prototype.schedule.call(this,t,y):(this.delay=y,this.state=t,this.scheduler.flush(this),this)},o.prototype.execute=function(t,y){return y>0||this.closed?n.prototype.execute.call(this,t,y):this._execute(t,y)},o.prototype.requestAsyncId=function(t,y,R){return R===void 0&&(R=0),R!==null&&R>0||R===null&&this.delay>0?n.prototype.requestAsyncId.call(this,t,y,R):t.flush(this)},o}(He),tt=function(){function n(o,t){t===void 0&&(t=n.now),this.SchedulerAction=o,this.now=t}return n.prototype.schedule=function(o,t,y){return t===void 0&&(t=0),new this.SchedulerAction(this,o).schedule(y,t)},n.now=function(){return Date.now()},n}(),Qe=function(n){r(o,n);function o(t,y){y===void 0&&(y=tt.now);var R=n.call(this,t,function(){return o.delegate&&o.delegate!==R?o.delegate.now():y()})||this;return R.actions=[],R.active=!1,R.scheduled=void 0,R}return o.prototype.schedule=function(t,y,R){return y===void 0&&(y=0),o.delegate&&o.delegate!==this?o.delegate.schedule(t,y,R):n.prototype.schedule.call(this,t,y,R)},o.prototype.flush=function(t){var y=this.actions;if(this.active){y.push(t);return}var R;this.active=!0;do if(R=t.execute(t.state,t.delay))break;while(t=y.shift());if(this.active=!1,R){for(;t=y.shift();)t.unsubscribe();throw R}},o}(tt),It=function(n){r(o,n);function o(){return n!==null&&n.apply(this,arguments)||this}return o}(Qe),ct=new It(xt),bt=ct,We=new fe(function(n){return n.complete()});function Ve(n){return n?Wt(n):We}function Wt(n){return new fe(function(o){return n.schedule(function(){return o.complete()})})}function Fe(n){return n&&typeof n.schedule=="function"}var Et=function(n){return function(o){for(var t=0,y=n.length;t<y&&!o.closed;t++)o.next(n[t]);o.complete()}};function rt(n,o){return new fe(function(t){var y=new V,R=0;return y.add(o.schedule(function(){if(R===n.length){t.complete();return}t.next(n[R++]),t.closed||y.add(this.schedule())})),y})}function Ke(n,o){return o?rt(n,o):new fe(Et(n))}function nt(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var t=n[n.length-1];return Fe(t)?(n.pop(),rt(n,t)):Ke(n)}function wt(n,o){return o?new fe(function(t){return o.schedule(Dt,0,{error:n,subscriber:t})}):new fe(function(t){return t.error(n)})}function Dt(n){var o=n.error,t=n.subscriber;t.error(o)}var it;it||(it={});var at=function(){function n(o,t,y){this.kind=o,this.value=t,this.error=y,this.hasValue=o==="N"}return n.prototype.observe=function(o){switch(this.kind){case"N":return o.next&&o.next(this.value);case"E":return o.error&&o.error(this.error);case"C":return o.complete&&o.complete()}},n.prototype.do=function(o,t,y){var R=this.kind;switch(R){case"N":return o&&o(this.value);case"E":return t&&t(this.error);case"C":return y&&y()}},n.prototype.accept=function(o,t,y){return o&&typeof o.next=="function"?this.observe(o):this.do(o,t,y)},n.prototype.toObservable=function(){var o=this.kind;switch(o){case"N":return nt(this.value);case"E":return wt(this.error);case"C":return Ve()}throw new Error("unexpected notification kind value")},n.createNext=function(o){return typeof o<"u"?new n("N",o):n.undefinedValueNotification},n.createError=function(o){return new n("E",void 0,o)},n.createComplete=function(){return n.completeNotification},n.completeNotification=new n("C"),n.undefinedValueNotification=new n("N",void 0),n}();function Vt(n,o){return o===void 0&&(o=0),function(y){return y.lift(new Bt(n,o))}}var Bt=null,Nt=function(n){r(o,n);function o(t,y,R){R===void 0&&(R=0);var $=n.call(this,t)||this;return $.scheduler=y,$.delay=R,$}return o.dispatch=function(t){var y=t.notification,R=t.destination;y.observe(R),this.unsubscribe()},o.prototype.scheduleMessage=function(t){var y=this.destination;y.add(this.scheduler.schedule(o.dispatch,this.delay,new lt(t,this.destination)))},o.prototype._next=function(t){this.scheduleMessage(at.createNext(t))},o.prototype._error=function(t){this.scheduleMessage(at.createError(t)),this.unsubscribe()},o.prototype._complete=function(){this.scheduleMessage(at.createComplete()),this.unsubscribe()},o}(X),lt=function(){function n(o,t){this.notification=o,this.destination=t}return n}(),jt=function(n){r(o,n);function o(t,y,R){t===void 0&&(t=Number.POSITIVE_INFINITY),y===void 0&&(y=Number.POSITIVE_INFINITY);var $=n.call(this)||this;return $.scheduler=R,$._events=[],$._infiniteTimeWindow=!1,$._bufferSize=t<1?1:t,$._windowTime=y<1?1:y,y===Number.POSITIVE_INFINITY?($._infiniteTimeWindow=!0,$.next=$.nextInfiniteTimeWindow):$.next=$.nextTimeWindow,$}return o.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var y=this._events;y.push(t),y.length>this._bufferSize&&y.shift()}n.prototype.next.call(this,t)},o.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new Kt(this._getNow(),t)),this._trimBufferThenGetEvents()),n.prototype.next.call(this,t)},o.prototype._subscribe=function(t){var y=this._infiniteTimeWindow,R=y?this._events:this._trimBufferThenGetEvents(),$=this.scheduler,ee=R.length,ie;if(this.closed)throw new Te;if(this.isStopped||this.hasError?ie=V.EMPTY:(this.observers.push(t),ie=new Ee(this,t)),$&&t.add(t=new Nt(t,$)),y)for(var oe=0;oe<ee&&!t.closed;oe++)t.next(R[oe]);else for(var oe=0;oe<ee&&!t.closed;oe++)t.next(R[oe].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),ie},o.prototype._getNow=function(){return(this.scheduler||bt).now()},o.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),y=this._bufferSize,R=this._windowTime,$=this._events,ee=$.length,ie=0;ie<ee&&!(t-$[ie].time<R);)ie++;return ee>y&&(ie=Math.max(ie,ee-y)),ie>0&&$.splice(0,ie),$},o}(je),Kt=function(){function n(o,t){this.time=o,this.value=t}return n}(),Ze=function(n){r(o,n);function o(){var t=n!==null&&n.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),V.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),V.EMPTY):n.prototype._subscribe.call(this,t)},o.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},o.prototype.error=function(t){this.hasCompleted||n.prototype.error.call(this,t)},o.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&n.prototype.next.call(this,this.value),n.prototype.complete.call(this)},o}(je),Gt=1,Ft=function(){return Promise.resolve()}(),Je={};function St(n){return n in Je?(delete Je[n],!0):!1}var Tt={setImmediate:function(n){var o=Gt++;return Je[o]=!0,Ft.then(function(){return St(o)&&n()}),o},clearImmediate:function(n){St(n)}},sr={pending:function(){return Object.keys(Je).length}},ft=function(n){r(o,n);function o(t,y){var R=n.call(this,t,y)||this;return R.scheduler=t,R.work=y,R}return o.prototype.requestAsyncId=function(t,y,R){return R===void 0&&(R=0),R!==null&&R>0?n.prototype.requestAsyncId.call(this,t,y,R):(t.actions.push(this),t.scheduled||(t.scheduled=Tt.setImmediate(t.flush.bind(t,null))))},o.prototype.recycleAsyncId=function(t,y,R){if(R===void 0&&(R=0),R!==null&&R>0||R===null&&this.delay>0)return n.prototype.recycleAsyncId.call(this,t,y,R);t.actions.length===0&&(Tt.clearImmediate(y),t.scheduled=void 0)},o}(He),dt=function(n){r(o,n);function o(){return n!==null&&n.apply(this,arguments)||this}return o.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var y=this.actions,R,$=-1,ee=y.length;t=t||y.shift();do if(R=t.execute(t.state,t.delay))break;while(++$<ee&&(t=y.shift()));if(this.active=!1,R){for(;++$<ee&&(t=y.shift());)t.unsubscribe();throw R}},o}(Qe),st=new dt(ft),ht=st,de=new Qe(He),Oe=de,Ae=function(n){r(o,n);function o(t,y){var R=n.call(this,t,y)||this;return R.scheduler=t,R.work=y,R}return o.prototype.requestAsyncId=function(t,y,R){return R===void 0&&(R=0),R!==null&&R>0?n.prototype.requestAsyncId.call(this,t,y,R):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(function(){return t.flush(null)})))},o.prototype.recycleAsyncId=function(t,y,R){if(R===void 0&&(R=0),R!==null&&R>0||R===null&&this.delay>0)return n.prototype.recycleAsyncId.call(this,t,y,R);t.actions.length===0&&(cancelAnimationFrame(y),t.scheduled=void 0)},o}(He),Me=function(n){r(o,n);function o(){return n!==null&&n.apply(this,arguments)||this}return o.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var y=this.actions,R,$=-1,ee=y.length;t=t||y.shift();do if(R=t.execute(t.state,t.delay))break;while(++$<ee&&(t=y.shift()));if(this.active=!1,R){for(;++$<ee&&(t=y.shift());)t.unsubscribe();throw R}},o}(Qe),Be=new Me(Ae),Ne=Be,Le=function(n){r(o,n);function o(t,y){t===void 0&&(t=Ot),y===void 0&&(y=Number.POSITIVE_INFINITY);var R=n.call(this,t,function(){return R.frame})||this;return R.maxFrames=y,R.frame=0,R.index=-1,R}return o.prototype.flush=function(){for(var t=this,y=t.actions,R=t.maxFrames,$,ee;(ee=y[0])&&ee.delay<=R&&(y.shift(),this.frame=ee.delay,!($=ee.execute(ee.state,ee.delay))););if($){for(;ee=y.shift();)ee.unsubscribe();throw $}},o.frameTimeFactor=10,o}(Qe),Ot=function(n){r(o,n);function o(t,y,R){R===void 0&&(R=t.index+=1);var $=n.call(this,t,y)||this;return $.scheduler=t,$.work=y,$.index=R,$.active=!0,$.index=t.index=R,$}return o.prototype.schedule=function(t,y){if(y===void 0&&(y=0),!this.id)return n.prototype.schedule.call(this,t,y);this.active=!1;var R=new o(this.scheduler,this.work);return this.add(R),R.schedule(t,y)},o.prototype.requestAsyncId=function(t,y,R){R===void 0&&(R=0),this.delay=t.frame+R;var $=t.actions;return $.push(this),$.sort(o.sortActions),!0},o.prototype.recycleAsyncId=function(t,y,R){R===void 0&&(R=0)},o.prototype._execute=function(t,y){if(this.active===!0)return n.prototype._execute.call(this,t,y)},o.sortActions=function(t,y){return t.delay===y.delay?t.index===y.index?0:t.index>y.index?1:-1:t.delay>y.delay?1:-1},o}(He);function ot(){}function or(n){return!!n&&(n instanceof fe||typeof n.lift=="function"&&typeof n.subscribe=="function")}var Xt=function(){function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n}(),Yt=Xt,Qt=function(){function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n}(),Zt=Qt,ur=function(){function n(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return n.prototype=Object.create(Error.prototype),n}(),cr=ur;function ut(n,o){return function(y){if(typeof n!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return y.lift(new lr(n,o))}}var lr=function(){function n(o,t){this.project=o,this.thisArg=t}return n.prototype.call=function(o,t){return t.subscribe(new fr(o,this.project,this.thisArg))},n}(),fr=function(n){r(o,n);function o(t,y,R){var $=n.call(this,t)||this;return $.project=y,$.count=0,$.thisArg=R||$,$}return o.prototype._next=function(t){var y;try{y=this.project.call(this.thisArg,t,this.count++)}catch(R){this.destination.error(R);return}this.destination.next(y)},o}(X);function dr(n,o,t){if(o)if(Fe(o))t=o;else return function(){for(var y=[],R=0;R<arguments.length;R++)y[R]=arguments[R];return dr(n,t).apply(void 0,y).pipe(ut(function($){return k($)?o.apply(void 0,$):o($)}))};return function(){for(var y=[],R=0;R<arguments.length;R++)y[R]=arguments[R];var $=this,ee,ie={context:$,subject:ee,callbackFunc:n,scheduler:t};return new fe(function(oe){if(t){var ge={args:y,subscriber:oe,params:ie};return t.schedule(Dr,0,ge)}else{if(!ee){ee=new Ze;var ue=function(){for(var me=[],he=0;he<arguments.length;he++)me[he]=arguments[he];ee.next(me.length<=1?me[0]:me),ee.complete()};try{n.apply($,y.concat([ue]))}catch(me){te(ee)?ee.error(me):console.warn(me)}}return ee.subscribe(oe)}})}}function Dr(n){var o=this,t=this,y=n.args,R=n.subscriber,$=n.params,ee=$.callbackFunc,ie=$.context,oe=$.scheduler,ue=$.subject;if(!ue){ue=$.subject=new Ze;var ge=function(){for(var me=[],he=0;he<arguments.length;he++)me[he]=arguments[he];var Ue=me.length<=1?me[0]:me;o.add(oe.schedule(hr,0,{value:Ue,subject:ue}))};try{ee.apply(ie,y.concat([ge]))}catch(me){ue.error(me)}}this.add(ue.subscribe(R))}function hr(n){var o=n.value,t=n.subject;t.next(o),t.complete()}function Br(n){var o=n.err,t=n.subject;t.error(o)}function Jt(n,o,t){if(o)if(Fe(o))t=o;else return function(){for(var y=[],R=0;R<arguments.length;R++)y[R]=arguments[R];return Jt(n,t).apply(void 0,y).pipe(ut(function($){return k($)?o.apply(void 0,$):o($)}))};return function(){for(var y=[],R=0;R<arguments.length;R++)y[R]=arguments[R];var $={subject:void 0,args:y,callbackFunc:n,scheduler:t,context:this};return new fe(function(ee){var ie=$.context,oe=$.subject;if(t)return t.schedule(vr,0,{params:$,subscriber:ee,context:ie});if(!oe){oe=$.subject=new Ze;var ue=function(){for(var ge=[],me=0;me<arguments.length;me++)ge[me]=arguments[me];var he=ge.shift();if(he){oe.error(he);return}oe.next(ge.length<=1?ge[0]:ge),oe.complete()};try{n.apply(ie,y.concat([ue]))}catch(ge){te(oe)?oe.error(ge):console.warn(ge)}}return oe.subscribe(ee)})}}function vr(n){var o=this,t=n.params,y=n.subscriber,R=n.context,$=t.callbackFunc,ee=t.args,ie=t.scheduler,oe=t.subject;if(!oe){oe=t.subject=new Ze;var ue=function(){for(var ge=[],me=0;me<arguments.length;me++)ge[me]=arguments[me];var he=ge.shift();if(he)o.add(ie.schedule(Lt,0,{err:he,subject:oe}));else{var Ue=ge.length<=1?ge[0]:ge;o.add(ie.schedule(pr,0,{value:Ue,subject:oe}))}};try{$.apply(R,ee.concat([ue]))}catch(ge){this.add(ie.schedule(Lt,0,{err:ge,subject:oe}))}}this.add(oe.subscribe(y))}function pr(n){var o=n.value,t=n.subject;t.next(o),t.complete()}function Lt(n){var o=n.err,t=n.subject;t.error(o)}var _t=function(n){r(o,n);function o(){return n!==null&&n.apply(this,arguments)||this}return o.prototype.notifyNext=function(t,y,R,$,ee){this.destination.next(y)},o.prototype.notifyError=function(t,y){this.destination.error(t)},o.prototype.notifyComplete=function(t){this.destination.complete()},o}(X),gr=function(n){r(o,n);function o(t,y,R){var $=n.call(this)||this;return $.parent=t,$.outerValue=y,$.outerIndex=R,$.index=0,$}return o.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},o.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},o.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},o}(X),mr=function(n){return function(o){return n.then(function(t){o.closed||(o.next(t),o.complete())},function(t){return o.error(t)}).then(null,d),o}};function yr(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ge=yr(),Nr=null,br=function(n){return function(o){var t=n[Ge]();do{var y=void 0;try{y=t.next()}catch(R){return o.error(R),o}if(y.done){o.complete();break}if(o.next(y.value),o.closed)break}while(!0);return typeof t.return=="function"&&o.add(function(){t.return&&t.return()}),o}},Er=function(n){return function(o){var t=n[se]();if(typeof t.subscribe!="function")throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(o)}},qt=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function er(n){return!!n&&typeof n.subscribe!="function"&&typeof n.then=="function"}var vt=function(n){if(!!n&&typeof n[se]=="function")return Er(n);if(qt(n))return Et(n);if(er(n))return mr(n);if(!!n&&typeof n[Ge]=="function")return br(n);var o=M(n)?"an invalid object":"'"+n+"'",t="You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(t)};function tr(n,o,t,y,R){if(R===void 0&&(R=new gr(n,t,y)),!R.closed)return o instanceof fe?o.subscribe(R):vt(o)(R)}var rr={};function wr(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var t=void 0,y=void 0;return Fe(n[n.length-1])&&(y=n.pop()),typeof n[n.length-1]=="function"&&(t=n.pop()),n.length===1&&k(n[0])&&(n=n[0]),Ke(n,y).lift(new Sr(t))}var Sr=function(){function n(o){this.resultSelector=o}return n.prototype.call=function(o,t){return t.subscribe(new Tr(o,this.resultSelector))},n}(),Tr=function(n){r(o,n);function o(t,y){var R=n.call(this,t)||this;return R.resultSelector=y,R.active=0,R.values=[],R.observables=[],R}return o.prototype._next=function(t){this.values.push(rr),this.observables.push(t)},o.prototype._complete=function(){var t=this.observables,y=t.length;if(y===0)this.destination.complete();else{this.active=y,this.toRespond=y;for(var R=0;R<y;R++){var $=t[R];this.add(tr(this,$,void 0,R))}}},o.prototype.notifyComplete=function(t){(this.active-=1)===0&&this.destination.complete()},o.prototype.notifyNext=function(t,y,R){var $=this.values,ee=$[R],ie=this.toRespond?ee===rr?--this.toRespond:this.toRespond:0;$[R]=y,ie===0&&(this.resultSelector?this._tryResultSelector($):this.destination.next($.slice()))},o.prototype._tryResultSelector=function(t){var y;try{y=this.resultSelector.apply(this,t)}catch(R){this.destination.error(R);return}this.destination.next(y)},o}(_t);function Or(n,o){return new fe(function(t){var y=new V;return y.add(o.schedule(function(){var R=n[se]();y.add(R.subscribe({next:function($){y.add(o.schedule(function(){return t.next($)}))},error:function($){y.add(o.schedule(function(){return t.error($)}))},complete:function(){y.add(o.schedule(function(){return t.complete()}))}}))})),y})}function Mr(n,o){return new fe(function(t){var y=new V;return y.add(o.schedule(function(){return n.then(function(R){y.add(o.schedule(function(){t.next(R),y.add(o.schedule(function(){return t.complete()}))}))},function(R){y.add(o.schedule(function(){return t.error(R)}))})})),y})}function Pr(n,o){if(!n)throw new Error("Iterable cannot be null");return new fe(function(t){var y=new V,R;return y.add(function(){R&&typeof R.return=="function"&&R.return()}),y.add(o.schedule(function(){R=n[Ge](),y.add(o.schedule(function(){if(!t.closed){var $,ee;try{var ie=R.next();$=ie.value,ee=ie.done}catch(oe){t.error(oe);return}ee?t.complete():(t.next($),this.schedule())}}))})),y})}function Ar(n){return n&&typeof n[se]=="function"}function Cr(n){return n&&typeof n[Ge]=="function"}function nr(n,o){if(n!=null){if(Ar(n))return Or(n,o);if(er(n))return Mr(n,o);if(qt(n))return rt(n,o);if(Cr(n)||typeof n=="string")return Pr(n,o)}throw new TypeError((n!==null&&typeof n||n)+" is not observable")}function ke(n,o){return o?nr(n,o):n instanceof fe?n:new fe(vt(n))}var ir=function(n){r(o,n);function o(t){var y=n.call(this)||this;return y.parent=t,y}return o.prototype._next=function(t){this.parent.notifyNext(t)},o.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},o.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},o}(X),Mt=function(n){r(o,n);function o(t,y,R){var $=n.call(this)||this;return $.parent=t,$.outerValue=y,$.outerIndex=R,$}return o.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this)},o.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},o.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},o}(X),Ut=function(n){r(o,n);function o(){return n!==null&&n.apply(this,arguments)||this}return o.prototype.notifyNext=function(t){this.destination.next(t)},o.prototype.notifyError=function(t){this.destination.error(t)},o.prototype.notifyComplete=function(){this.destination.complete()},o}(X),jr=function(n){r(o,n);function o(){return n!==null&&n.apply(this,arguments)||this}return o.prototype.notifyNext=function(t,y,R,$){this.destination.next(y)},o.prototype.notifyError=function(t){this.destination.error(t)},o.prototype.notifyComplete=function(t){this.destination.complete()},o}(X);function kt(n,o){if(!o.closed){if(n instanceof fe)return n.subscribe(o);var t;try{t=vt(n)(o)}catch(y){o.error(y)}return t}}function _e(n,o,t){return t===void 0&&(t=Number.POSITIVE_INFINITY),typeof o=="function"?function(y){return y.pipe(_e(function(R,$){return ke(n(R,$)).pipe(ut(function(ee,ie){return o(R,ee,$,ie)}))},t))}:(typeof o=="number"&&(t=o),function(y){return y.lift(new C(n,t))})}var C=function(){function n(o,t){t===void 0&&(t=Number.POSITIVE_INFINITY),this.project=o,this.concurrent=t}return n.prototype.call=function(o,t){return t.subscribe(new B(o,this.project,this.concurrent))},n}(),B=function(n){r(o,n);function o(t,y,R){R===void 0&&(R=Number.POSITIVE_INFINITY);var $=n.call(this,t)||this;return $.project=y,$.concurrent=R,$.hasCompleted=!1,$.buffer=[],$.active=0,$.index=0,$}return o.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},o.prototype._tryNext=function(t){var y,R=this.index++;try{y=this.project(t,R)}catch($){this.destination.error($);return}this.active++,this._innerSub(y)},o.prototype._innerSub=function(t){var y=new ir(this),R=this.destination;R.add(y);var $=kt(t,y);$!==y&&R.add($)},o.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete(),this.unsubscribe()},o.prototype.notifyNext=function(t){this.destination.next(t)},o.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},o}(Ut),P=null;function K(n){return n===void 0&&(n=Number.POSITIVE_INFINITY),_e(ne,n)}function Y(){return K(1)}function _(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return Y()(nt.apply(void 0,n))}function ae(n){return new fe(function(o){var t;try{t=n()}catch(R){o.error(R);return}var y=t?ke(t):Ve();return y.subscribe(o)})}function ve(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(n.length===1){var t=n[0];if(k(t))return we(t,null);if(M(t)&&Object.getPrototypeOf(t)===Object.prototype){var y=Object.keys(t);return we(y.map(function($){return t[$]}),y)}}if(typeof n[n.length-1]=="function"){var R=n.pop();return n=n.length===1&&k(n[0])?n[0]:n,we(n,null).pipe(ut(function($){return R.apply(void 0,$)}))}return we(n,null)}function we(n,o){return new fe(function(t){var y=n.length;if(y===0){t.complete();return}for(var R=new Array(y),$=0,ee=0,ie=function(ue){var ge=ke(n[ue]),me=!1;t.add(ge.subscribe({next:function(he){me||(me=!0,ee++),R[ue]=he},error:function(he){return t.error(he)},complete:function(){$++,($===y||!me)&&(ee===y&&t.next(o?o.reduce(function(he,Ue,$t){return he[Ue]=R[$t],he},{}):R),t.complete())}}))},oe=0;oe<y;oe++)ie(oe)})}var ye=null;function Ce(n,o,t,y){return j(t)&&(y=t,t=void 0),y?Ce(n,o,t).pipe(ut(function(R){return k(R)?y.apply(void 0,R):y(R)})):new fe(function(R){function $(ee){arguments.length>1?R.next(Array.prototype.slice.call(arguments)):R.next(ee)}De(n,o,$,R,t)})}function De(n,o,t,y,R){var $;if(pt(n)){var ee=n;n.addEventListener(o,t,R),$=function(){return ee.removeEventListener(o,t,R)}}else if($e(n)){var ie=n;n.on(o,t),$=function(){return ie.off(o,t)}}else if(Se(n)){var oe=n;n.addListener(o,t),$=function(){return oe.removeListener(o,t)}}else if(n&&n.length)for(var ue=0,ge=n.length;ue<ge;ue++)De(n[ue],o,t,y,R);else throw new TypeError("Invalid event target");y.add($)}function Se(n){return n&&typeof n.addListener=="function"&&typeof n.removeListener=="function"}function $e(n){return n&&typeof n.on=="function"&&typeof n.off=="function"}function pt(n){return n&&typeof n.addEventListener=="function"&&typeof n.removeEventListener=="function"}function ze(n,o,t){return t?ze(n,o).pipe(ut(function(y){return k(y)?t.apply(void 0,y):t(y)})):new fe(function(y){var R=function(){for(var ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];return y.next(ee.length===1?ee[0]:ee)},$;try{$=n(R)}catch(ee){y.error(ee);return}if(!!j(o))return function(){return o(R,$)}})}function Rr(n,o,t,y,R){var $,ee;if(arguments.length==1){var ie=n;ee=ie.initialState,o=ie.condition,t=ie.iterate,$=ie.resultSelector||ne,R=ie.scheduler}else y===void 0||Fe(y)?(ee=n,$=ne,R=y):(ee=n,$=y);return new fe(function(oe){var ue=ee;if(R)return R.schedule(Ur,0,{subscriber:oe,iterate:t,condition:o,resultSelector:$,state:ue});do{if(o){var ge=void 0;try{ge=o(ue)}catch(he){oe.error(he);return}if(!ge){oe.complete();break}}var me=void 0;try{me=$(ue)}catch(he){oe.error(he);return}if(oe.next(me),oe.closed)break;try{ue=t(ue)}catch(he){oe.error(he);return}}while(!0)})}function Ur(n){var o=n.subscriber,t=n.condition;if(!o.closed){if(n.needIterate)try{n.state=n.iterate(n.state)}catch($){o.error($);return}else n.needIterate=!0;if(t){var y=void 0;try{y=t(n.state)}catch($){o.error($);return}if(!y){o.complete();return}if(o.closed)return}var R;try{R=n.resultSelector(n.state)}catch($){o.error($);return}if(!o.closed&&(o.next(R),!o.closed))return this.schedule(n)}}function kr(n,o,t){return o===void 0&&(o=We),t===void 0&&(t=We),ae(function(){return n()?o:t})}function xr(n){return!k(n)&&n-parseFloat(n)+1>=0}function $r(n,o){return n===void 0&&(n=0),o===void 0&&(o=Oe),(!xr(n)||n<0)&&(n=0),(!o||typeof o.schedule!="function")&&(o=Oe),new fe(function(t){return t.add(o.schedule(zr,n,{subscriber:t,counter:0,period:n})),t})}function zr(n){var o=n.subscriber,t=n.counter,y=n.period;o.next(t),this.schedule({subscriber:o,counter:t+1,period:y},y)}function Hr(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var t=Number.POSITIVE_INFINITY,y=null,R=n[n.length-1];return Fe(R)?(y=n.pop(),n.length>1&&typeof n[n.length-1]=="number"&&(t=n.pop())):typeof R=="number"&&(t=n.pop()),y===null&&n.length===1&&n[0]instanceof fe?n[0]:K(t)(Ke(n,y))}var Fr=new fe(ot);function Wr(){return Fr}function Ir(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(n.length===0)return We;var t=n[0],y=n.slice(1);return n.length===1&&k(t)?Ir.apply(void 0,t):new fe(function(R){var $=function(){return R.add(Ir.apply(void 0,y).subscribe(R))};return ke(t).subscribe({next:function(ee){R.next(ee)},error:$,complete:$})})}function Vr(n,o){return o?new fe(function(t){var y=Object.keys(n),R=new V;return R.add(o.schedule(Kr,0,{keys:y,index:0,subscriber:t,subscription:R,obj:n})),R}):new fe(function(t){for(var y=Object.keys(n),R=0;R<y.length&&!t.closed;R++){var $=y[R];n.hasOwnProperty($)&&t.next([$,n[$]])}t.complete()})}function Kr(n){var o=n.keys,t=n.index,y=n.subscriber,R=n.subscription,$=n.obj;if(!y.closed)if(t<o.length){var ee=o[t];y.next([ee,$[ee]]),R.add(this.schedule({keys:o,index:t+1,subscriber:y,subscription:R,obj:$}))}else y.complete()}function Gr(n,o){function t(){return!t.pred.apply(t.thisArg,arguments)}return t.pred=n,t.thisArg=o,t}function Lr(n,o){return function(y){return y.lift(new Xr(n,o))}}var Xr=function(){function n(o,t){this.predicate=o,this.thisArg=t}return n.prototype.call=function(o,t){return t.subscribe(new Yr(o,this.predicate,this.thisArg))},n}(),Yr=function(n){r(o,n);function o(t,y,R){var $=n.call(this,t)||this;return $.predicate=y,$.thisArg=R,$.count=0,$}return o.prototype._next=function(t){var y;try{y=this.predicate.call(this.thisArg,t,this.count++)}catch(R){this.destination.error(R);return}y&&this.destination.next(t)},o}(X);function Qr(n,o,t){return[Lr(o,t)(new fe(vt(n))),Lr(Gr(o,t))(new fe(vt(n)))]}function Zr(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(n.length===1)if(k(n[0]))n=n[0];else return n[0];return Ke(n,void 0).lift(new Jr)}var Jr=function(){function n(){}return n.prototype.call=function(o,t){return t.subscribe(new _r(o))},n}(),_r=function(n){r(o,n);function o(t){var y=n.call(this,t)||this;return y.hasFirst=!1,y.observables=[],y.subscriptions=[],y}return o.prototype._next=function(t){this.observables.push(t)},o.prototype._complete=function(){var t=this.observables,y=t.length;if(y===0)this.destination.complete();else{for(var R=0;R<y&&!this.hasFirst;R++){var $=t[R],ee=tr(this,$,void 0,R);this.subscriptions&&this.subscriptions.push(ee),this.add(ee)}this.observables=null}},o.prototype.notifyNext=function(t,y,R){if(!this.hasFirst){this.hasFirst=!0;for(var $=0;$<this.subscriptions.length;$++)if($!==R){var ee=this.subscriptions[$];ee.unsubscribe(),this.remove(ee)}this.subscriptions=null}this.destination.next(y)},o}(_t);function qr(n,o,t){return n===void 0&&(n=0),new fe(function(y){o===void 0&&(o=n,n=0);var R=0,$=n;if(t)return t.schedule(en,0,{index:R,count:o,start:n,subscriber:y});do{if(R++>=o){y.complete();break}if(y.next($++),y.closed)break}while(!0)})}function en(n){var o=n.start,t=n.index,y=n.count,R=n.subscriber;if(t>=y){R.complete();return}R.next(o),!R.closed&&(n.index=t+1,n.start=o+1,this.schedule(n))}function tn(n,o,t){n===void 0&&(n=0);var y=-1;return xr(o)?y=Number(o)<1&&1||Number(o):Fe(o)&&(t=o),Fe(t)||(t=Oe),new fe(function(R){var $=xr(n)?n:+n-t.now();return t.schedule(rn,$,{index:0,period:y,subscriber:R})})}function rn(n){var o=n.index,t=n.period,y=n.subscriber;if(y.next(o),!y.closed){if(t===-1)return y.complete();n.index=o+1,this.schedule(n,t)}}function nn(n,o){return new fe(function(t){var y;try{y=n()}catch(ie){t.error(ie);return}var R;try{R=o(y)}catch(ie){t.error(ie);return}var $=R?ke(R):We,ee=$.subscribe(t);return function(){ee.unsubscribe(),y&&y.unsubscribe()}})}function an(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var t=n[n.length-1];return typeof t=="function"&&n.pop(),Ke(n,void 0).lift(new sn(t))}var sn=function(){function n(o){this.resultSelector=o}return n.prototype.call=function(o,t){return t.subscribe(new on(o,this.resultSelector))},n}(),on=function(n){r(o,n);function o(t,y,R){R===void 0&&(R=Object.create(null));var $=n.call(this,t)||this;return $.resultSelector=y,$.iterators=[],$.active=0,$.resultSelector=typeof y=="function"?y:void 0,$}return o.prototype._next=function(t){var y=this.iterators;k(t)?y.push(new cn(t)):typeof t[Ge]=="function"?y.push(new un(t[Ge]())):y.push(new ln(this.destination,this,t))},o.prototype._complete=function(){var t=this.iterators,y=t.length;if(this.unsubscribe(),y===0){this.destination.complete();return}this.active=y;for(var R=0;R<y;R++){var $=t[R];if($.stillUnsubscribed){var ee=this.destination;ee.add($.subscribe())}else this.active--}},o.prototype.notifyInactive=function(){this.active--,this.active===0&&this.destination.complete()},o.prototype.checkIterators=function(){for(var t=this.iterators,y=t.length,R=this.destination,$=0;$<y;$++){var ee=t[$];if(typeof ee.hasValue=="function"&&!ee.hasValue())return}for(var ie=!1,oe=[],$=0;$<y;$++){var ee=t[$],ue=ee.next();if(ee.hasCompleted()&&(ie=!0),ue.done){R.complete();return}oe.push(ue.value)}this.resultSelector?this._tryresultSelector(oe):R.next(oe),ie&&R.complete()},o.prototype._tryresultSelector=function(t){var y;try{y=this.resultSelector.apply(this,t)}catch(R){this.destination.error(R);return}this.destination.next(y)},o}(X),un=function(){function n(o){this.iterator=o,this.nextResult=o.next()}return n.prototype.hasValue=function(){return!0},n.prototype.next=function(){var o=this.nextResult;return this.nextResult=this.iterator.next(),o},n.prototype.hasCompleted=function(){var o=this.nextResult;return Boolean(o&&o.done)},n}(),cn=function(){function n(o){this.array=o,this.index=0,this.length=0,this.length=o.length}return n.prototype[Ge]=function(){return this},n.prototype.next=function(o){var t=this.index++,y=this.array;return t<this.length?{value:y[t],done:!1}:{value:null,done:!0}},n.prototype.hasValue=function(){return this.array.length>this.index},n.prototype.hasCompleted=function(){return this.array.length===this.index},n}(),ln=function(n){r(o,n);function o(t,y,R){var $=n.call(this,t)||this;return $.parent=y,$.observable=R,$.stillUnsubscribed=!0,$.buffer=[],$.isComplete=!1,$}return o.prototype[Ge]=function(){return this},o.prototype.next=function(){var t=this.buffer;return t.length===0&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},o.prototype.hasValue=function(){return this.buffer.length>0},o.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},o.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},o.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},o.prototype.subscribe=function(){return kt(this.observable,new ir(this))},o}(Ut)},67801:function(G,f,e){const p=Symbol("SemVer ANY");class r{static get ANY(){return p}constructor(N,D){if(D=u(D),N instanceof r){if(N.loose===!!D.loose)return N;N=N.value}c("comparator",N,D),this.options=D,this.loose=!!D.loose,this.parse(N),this.semver===p?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(N){const D=this.options.loose?i[g.COMPARATORLOOSE]:i[g.COMPARATOR],H=N.match(D);if(!H)throw new TypeError(`Invalid comparator: ${N}`);this.operator=H[1]!==void 0?H[1]:"",this.operator==="="&&(this.operator=""),H[2]?this.semver=new v(H[2],this.options.loose):this.semver=p}toString(){return this.value}test(N){if(c("Comparator.test",N,this.options.loose),this.semver===p||N===p)return!0;if(typeof N=="string")try{N=new v(N,this.options)}catch{return!1}return a(N,this.operator,this.semver,this.options)}intersects(N,D){if(!(N instanceof r))throw new TypeError("a Comparator is required");if((!D||typeof D!="object")&&(D={loose:!!D,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new m(N.value,D).test(this.value);if(N.operator==="")return N.value===""?!0:new m(this.value,D).test(N.semver);const H=(this.operator===">="||this.operator===">")&&(N.operator===">="||N.operator===">"),x=(this.operator==="<="||this.operator==="<")&&(N.operator==="<="||N.operator==="<"),w=this.semver.version===N.semver.version,O=(this.operator===">="||this.operator==="<=")&&(N.operator===">="||N.operator==="<="),S=a(this.semver,"<",N.semver,D)&&(this.operator===">="||this.operator===">")&&(N.operator==="<="||N.operator==="<"),L=a(this.semver,">",N.semver,D)&&(this.operator==="<="||this.operator==="<")&&(N.operator===">="||N.operator===">");return H||x||w&&O||S||L}}G.exports=r;const u=e(25518),{re:i,t:g}=e(41870),a=e(82864),c=e(86322),v=e(86244),m=e(89061)},89061:function(G,f,e){class p{constructor(A,k){if(k=i(k),A instanceof p)return A.loose===!!k.loose&&A.includePrerelease===!!k.includePrerelease?A:new p(A.raw,k);if(A instanceof g)return this.raw=A.value,this.set=[[A]],this.format(),this;if(this.options=k,this.loose=!!k.loose,this.includePrerelease=!!k.includePrerelease,this.raw=A,this.set=A.split("||").map(M=>this.parseRange(M.trim())).filter(M=>M.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${A}`);if(this.set.length>1){const M=this.set[0];if(this.set=this.set.filter(U=>!H(U[0])),this.set.length===0)this.set=[M];else if(this.set.length>1){for(const U of this.set)if(U.length===1&&x(U[0])){this.set=[U];break}}}this.format()}format(){return this.range=this.set.map(A=>A.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(A){A=A.trim();const M=`parseRange:${Object.keys(this.options).join(",")}:${A}`,U=u.get(M);if(U)return U;const z=this.options.loose,V=z?v[m.HYPHENRANGELOOSE]:v[m.HYPHENRANGE];A=A.replace(V,F(this.options.includePrerelease)),a("hyphen replace",A),A=A.replace(v[m.COMPARATORTRIM],b),a("comparator trim",A),A=A.replace(v[m.TILDETRIM],N),A=A.replace(v[m.CARETTRIM],D),A=A.split(/\s+/).join(" ");let Q=A.split(" ").map(q=>O(q,this.options)).join(" ").split(/\s+/).map(q=>j(q,this.options));z&&(Q=Q.filter(q=>(a("loose invalid filter",q,this.options),!!q.match(v[m.COMPARATORLOOSE])))),a("range list",Q);const Z=new Map,J=Q.map(q=>new g(q,this.options));for(const q of J){if(H(q))return[q];Z.set(q.value,q)}Z.size>1&&Z.has("")&&Z.delete("");const X=[...Z.values()];return u.set(M,X),X}intersects(A,k){if(!(A instanceof p))throw new TypeError("a Range is required");return this.set.some(M=>w(M,k)&&A.set.some(U=>w(U,k)&&M.every(z=>U.every(V=>z.intersects(V,k)))))}test(A){if(!A)return!1;if(typeof A=="string")try{A=new c(A,this.options)}catch{return!1}for(let k=0;k<this.set.length;k++)if(W(this.set[k],A,this.options))return!0;return!1}}G.exports=p;const r=e(39593),u=new r({max:1e3}),i=e(25518),g=e(67801),a=e(86322),c=e(86244),{re:v,t:m,comparatorTrimReplace:b,tildeTrimReplace:N,caretTrimReplace:D}=e(41870),H=d=>d.value==="<0.0.0-0",x=d=>d.value==="",w=(d,A)=>{let k=!0;const M=d.slice();let U=M.pop();for(;k&&M.length;)k=M.every(z=>U.intersects(z,A)),U=M.pop();return k},O=(d,A)=>(a("comp",d,A),d=T(d,A),a("caret",d),d=L(d,A),a("tildes",d),d=l(d,A),a("xrange",d),d=E(d,A),a("stars",d),d),S=d=>!d||d.toLowerCase()==="x"||d==="*",L=(d,A)=>d.trim().split(/\s+/).map(k=>I(k,A)).join(" "),I=(d,A)=>{const k=A.loose?v[m.TILDELOOSE]:v[m.TILDE];return d.replace(k,(M,U,z,V,Q)=>{a("tilde",d,M,U,z,V,Q);let Z;return S(U)?Z="":S(z)?Z=`>=${U}.0.0 <${+U+1}.0.0-0`:S(V)?Z=`>=${U}.${z}.0 <${U}.${+z+1}.0-0`:Q?(a("replaceTilde pr",Q),Z=`>=${U}.${z}.${V}-${Q} <${U}.${+z+1}.0-0`):Z=`>=${U}.${z}.${V} <${U}.${+z+1}.0-0`,a("tilde return",Z),Z})},T=(d,A)=>d.trim().split(/\s+/).map(k=>s(k,A)).join(" "),s=(d,A)=>{a("caret",d,A);const k=A.loose?v[m.CARETLOOSE]:v[m.CARET],M=A.includePrerelease?"-0":"";return d.replace(k,(U,z,V,Q,Z)=>{a("caret",d,U,z,V,Q,Z);let J;return S(z)?J="":S(V)?J=`>=${z}.0.0${M} <${+z+1}.0.0-0`:S(Q)?z==="0"?J=`>=${z}.${V}.0${M} <${z}.${+V+1}.0-0`:J=`>=${z}.${V}.0${M} <${+z+1}.0.0-0`:Z?(a("replaceCaret pr",Z),z==="0"?V==="0"?J=`>=${z}.${V}.${Q}-${Z} <${z}.${V}.${+Q+1}-0`:J=`>=${z}.${V}.${Q}-${Z} <${z}.${+V+1}.0-0`:J=`>=${z}.${V}.${Q}-${Z} <${+z+1}.0.0-0`):(a("no pr"),z==="0"?V==="0"?J=`>=${z}.${V}.${Q}${M} <${z}.${V}.${+Q+1}-0`:J=`>=${z}.${V}.${Q}${M} <${z}.${+V+1}.0-0`:J=`>=${z}.${V}.${Q} <${+z+1}.0.0-0`),a("caret return",J),J})},l=(d,A)=>(a("replaceXRanges",d,A),d.split(/\s+/).map(k=>h(k,A)).join(" ")),h=(d,A)=>{d=d.trim();const k=A.loose?v[m.XRANGELOOSE]:v[m.XRANGE];return d.replace(k,(M,U,z,V,Q,Z)=>{a("xRange",d,M,U,z,V,Q,Z);const J=S(z),X=J||S(V),q=X||S(Q),te=q;return U==="="&&te&&(U=""),Z=A.includePrerelease?"-0":"",J?U===">"||U==="<"?M="<0.0.0-0":M="*":U&&te?(X&&(V=0),Q=0,U===">"?(U=">=",X?(z=+z+1,V=0,Q=0):(V=+V+1,Q=0)):U==="<="&&(U="<",X?z=+z+1:V=+V+1),U==="<"&&(Z="-0"),M=`${U+z}.${V}.${Q}${Z}`):X?M=`>=${z}.0.0${Z} <${+z+1}.0.0-0`:q&&(M=`>=${z}.${V}.0${Z} <${z}.${+V+1}.0-0`),a("xRange return",M),M})},E=(d,A)=>(a("replaceStars",d,A),d.trim().replace(v[m.STAR],"")),j=(d,A)=>(a("replaceGTE0",d,A),d.trim().replace(v[A.includePrerelease?m.GTE0PRE:m.GTE0],"")),F=d=>(A,k,M,U,z,V,Q,Z,J,X,q,te,re)=>(S(M)?k="":S(U)?k=`>=${M}.0.0${d?"-0":""}`:S(z)?k=`>=${M}.${U}.0${d?"-0":""}`:V?k=`>=${k}`:k=`>=${k}${d?"-0":""}`,S(J)?Z="":S(X)?Z=`<${+J+1}.0.0-0`:S(q)?Z=`<${J}.${+X+1}.0-0`:te?Z=`<=${J}.${X}.${q}-${te}`:d?Z=`<${J}.${X}.${+q+1}-0`:Z=`<=${Z}`,`${k} ${Z}`.trim()),W=(d,A,k)=>{for(let M=0;M<d.length;M++)if(!d[M].test(A))return!1;if(A.prerelease.length&&!k.includePrerelease){for(let M=0;M<d.length;M++)if(a(d[M].semver),d[M].semver!==g.ANY&&d[M].semver.prerelease.length>0){const U=d[M].semver;if(U.major===A.major&&U.minor===A.minor&&U.patch===A.patch)return!0}return!1}return!0}},86244:function(G,f,e){const p=e(86322),{MAX_LENGTH:r,MAX_SAFE_INTEGER:u}=e(40602),{re:i,t:g}=e(41870),a=e(25518),{compareIdentifiers:c}=e(13189);class v{constructor(b,N){if(N=a(N),b instanceof v){if(b.loose===!!N.loose&&b.includePrerelease===!!N.includePrerelease)return b;b=b.version}else if(typeof b!="string")throw new TypeError(`Invalid Version: ${b}`);if(b.length>r)throw new TypeError(`version is longer than ${r} characters`);p("SemVer",b,N),this.options=N,this.loose=!!N.loose,this.includePrerelease=!!N.includePrerelease;const D=b.trim().match(N.loose?i[g.LOOSE]:i[g.FULL]);if(!D)throw new TypeError(`Invalid Version: ${b}`);if(this.raw=b,this.major=+D[1],this.minor=+D[2],this.patch=+D[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");D[4]?this.prerelease=D[4].split(".").map(H=>{if(/^[0-9]+$/.test(H)){const x=+H;if(x>=0&&x<u)return x}return H}):this.prerelease=[],this.build=D[5]?D[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(b){if(p("SemVer.compare",this.version,this.options,b),!(b instanceof v)){if(typeof b=="string"&&b===this.version)return 0;b=new v(b,this.options)}return b.version===this.version?0:this.compareMain(b)||this.comparePre(b)}compareMain(b){return b instanceof v||(b=new v(b,this.options)),c(this.major,b.major)||c(this.minor,b.minor)||c(this.patch,b.patch)}comparePre(b){if(b instanceof v||(b=new v(b,this.options)),this.prerelease.length&&!b.prerelease.length)return-1;if(!this.prerelease.length&&b.prerelease.length)return 1;if(!this.prerelease.length&&!b.prerelease.length)return 0;let N=0;do{const D=this.prerelease[N],H=b.prerelease[N];if(p("prerelease compare",N,D,H),D===void 0&&H===void 0)return 0;if(H===void 0)return 1;if(D===void 0)return-1;if(D===H)continue;return c(D,H)}while(++N)}compareBuild(b){b instanceof v||(b=new v(b,this.options));let N=0;do{const D=this.build[N],H=b.build[N];if(p("prerelease compare",N,D,H),D===void 0&&H===void 0)return 0;if(H===void 0)return 1;if(D===void 0)return-1;if(D===H)continue;return c(D,H)}while(++N)}inc(b,N){switch(b){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",N);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",N);break;case"prepatch":this.prerelease.length=0,this.inc("patch",N),this.inc("pre",N);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",N),this.inc("pre",N);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let D=this.prerelease.length;for(;--D>=0;)typeof this.prerelease[D]=="number"&&(this.prerelease[D]++,D=-2);D===-1&&this.prerelease.push(0)}N&&(c(this.prerelease[0],N)===0?isNaN(this.prerelease[1])&&(this.prerelease=[N,0]):this.prerelease=[N,0]);break;default:throw new Error(`invalid increment argument: ${b}`)}return this.format(),this.raw=this.version,this}}G.exports=v},32340:function(G,f,e){const p=e(82362),r=(u,i)=>{const g=p(u.trim().replace(/^[=v]+/,""),i);return g?g.version:null};G.exports=r},82864:function(G,f,e){const p=e(65254),r=e(16570),u=e(81666),i=e(63041),g=e(98771),a=e(77179),c=(v,m,b,N)=>{switch(m){case"===":return typeof v=="object"&&(v=v.version),typeof b=="object"&&(b=b.version),v===b;case"!==":return typeof v=="object"&&(v=v.version),typeof b=="object"&&(b=b.version),v!==b;case"":case"=":case"==":return p(v,b,N);case"!=":return r(v,b,N);case">":return u(v,b,N);case">=":return i(v,b,N);case"<":return g(v,b,N);case"<=":return a(v,b,N);default:throw new TypeError(`Invalid operator: ${m}`)}};G.exports=c},88384:function(G,f,e){const p=e(86244),r=e(82362),{re:u,t:i}=e(41870),g=(a,c)=>{if(a instanceof p)return a;if(typeof a=="number"&&(a=String(a)),typeof a!="string")return null;c=c||{};let v=null;if(!c.rtl)v=a.match(u[i.COERCE]);else{let m;for(;(m=u[i.COERCERTL].exec(a))&&(!v||v.index+v[0].length!==a.length);)(!v||m.index+m[0].length!==v.index+v[0].length)&&(v=m),u[i.COERCERTL].lastIndex=m.index+m[1].length+m[2].length;u[i.COERCERTL].lastIndex=-1}return v===null?null:r(`${v[2]}.${v[3]||"0"}.${v[4]||"0"}`,c)};G.exports=g},62754:function(G,f,e){const p=e(86244),r=(u,i,g)=>{const a=new p(u,g),c=new p(i,g);return a.compare(c)||a.compareBuild(c)};G.exports=r},20869:function(G,f,e){const p=e(32641),r=(u,i)=>p(u,i,!0);G.exports=r},32641:function(G,f,e){const p=e(86244),r=(u,i,g)=>new p(u,g).compare(new p(i,g));G.exports=r},92330:function(G,f,e){const p=e(82362),r=e(65254),u=(i,g)=>{if(r(i,g))return null;{const a=p(i),c=p(g),v=a.prerelease.length||c.prerelease.length,m=v?"pre":"",b=v?"prerelease":"";for(const N in a)if((N==="major"||N==="minor"||N==="patch")&&a[N]!==c[N])return m+N;return b}};G.exports=u},65254:function(G,f,e){const p=e(32641),r=(u,i,g)=>p(u,i,g)===0;G.exports=r},81666:function(G,f,e){const p=e(32641),r=(u,i,g)=>p(u,i,g)>0;G.exports=r},63041:function(G,f,e){const p=e(32641),r=(u,i,g)=>p(u,i,g)>=0;G.exports=r},64156:function(G,f,e){const p=e(86244),r=(u,i,g,a)=>{typeof g=="string"&&(a=g,g=void 0);try{return new p(u instanceof p?u.version:u,g).inc(i,a).version}catch{return null}};G.exports=r},98771:function(G,f,e){const p=e(32641),r=(u,i,g)=>p(u,i,g)<0;G.exports=r},77179:function(G,f,e){const p=e(32641),r=(u,i,g)=>p(u,i,g)<=0;G.exports=r},98760:function(G,f,e){const p=e(86244),r=(u,i)=>new p(u,i).major;G.exports=r},71801:function(G,f,e){const p=e(86244),r=(u,i)=>new p(u,i).minor;G.exports=r},16570:function(G,f,e){const p=e(32641),r=(u,i,g)=>p(u,i,g)!==0;G.exports=r},82362:function(G,f,e){const{MAX_LENGTH:p}=e(40602),{re:r,t:u}=e(41870),i=e(86244),g=e(25518),a=(c,v)=>{if(v=g(v),c instanceof i)return c;if(typeof c!="string"||c.length>p||!(v.loose?r[u.LOOSE]:r[u.FULL]).test(c))return null;try{return new i(c,v)}catch{return null}};G.exports=a},47184:function(G,f,e){const p=e(86244),r=(u,i)=>new p(u,i).patch;G.exports=r},6399:function(G,f,e){const p=e(82362),r=(u,i)=>{const g=p(u,i);return g&&g.prerelease.length?g.prerelease:null};G.exports=r},58209:function(G,f,e){const p=e(32641),r=(u,i,g)=>p(i,u,g);G.exports=r},53729:function(G,f,e){const p=e(62754),r=(u,i)=>u.sort((g,a)=>p(a,g,i));G.exports=r},8139:function(G,f,e){const p=e(89061),r=(u,i,g)=>{try{i=new p(i,g)}catch{return!1}return i.test(u)};G.exports=r},46184:function(G,f,e){const p=e(62754),r=(u,i)=>u.sort((g,a)=>p(g,a,i));G.exports=r},87705:function(G,f,e){const p=e(82362),r=(u,i)=>{const g=p(u,i);return g?g.version:null};G.exports=r},28371:function(G,f,e){const p=e(41870);G.exports={re:p.re,src:p.src,tokens:p.t,SEMVER_SPEC_VERSION:e(40602).SEMVER_SPEC_VERSION,SemVer:e(86244),compareIdentifiers:e(13189).compareIdentifiers,rcompareIdentifiers:e(13189).rcompareIdentifiers,parse:e(82362),valid:e(87705),clean:e(32340),inc:e(64156),diff:e(92330),major:e(98760),minor:e(71801),patch:e(47184),prerelease:e(6399),compare:e(32641),rcompare:e(58209),compareLoose:e(20869),compareBuild:e(62754),sort:e(46184),rsort:e(53729),gt:e(81666),lt:e(98771),eq:e(65254),neq:e(16570),gte:e(63041),lte:e(77179),cmp:e(82864),coerce:e(88384),Comparator:e(67801),Range:e(89061),satisfies:e(8139),toComparators:e(92811),maxSatisfying:e(59290),minSatisfying:e(62465),minVersion:e(91785),validRange:e(77855),outside:e(86049),gtr:e(42097),ltr:e(59850),intersects:e(34298),simplifyRange:e(29905),subset:e(1254)}},40602:function(G){const f="2.0.0",p=Number.MAX_SAFE_INTEGER||9007199254740991,r=16;G.exports={SEMVER_SPEC_VERSION:f,MAX_LENGTH:256,MAX_SAFE_INTEGER:p,MAX_SAFE_COMPONENT_LENGTH:r}},86322:function(G,f,e){var p=e(34155);const r=typeof p=="object"&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?(...u)=>console.error("SEMVER",...u):()=>{};G.exports=r},13189:function(G){const f=/^[0-9]+$/,e=(r,u)=>{const i=f.test(r),g=f.test(u);return i&&g&&(r=+r,u=+u),r===u?0:i&&!g?-1:g&&!i?1:r<u?-1:1},p=(r,u)=>e(u,r);G.exports={compareIdentifiers:e,rcompareIdentifiers:p}},25518:function(G){const f=["includePrerelease","loose","rtl"],e=p=>p?typeof p!="object"?{loose:!0}:f.filter(r=>p[r]).reduce((r,u)=>(r[u]=!0,r),{}):{};G.exports=e},41870:function(G,f,e){const{MAX_SAFE_COMPONENT_LENGTH:p}=e(40602),r=e(86322);f=G.exports={};const u=f.re=[],i=f.src=[],g=f.t={};let a=0;const c=(v,m,b)=>{const N=a++;r(v,N,m),g[v]=N,i[N]=m,u[N]=new RegExp(m,b?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[g.NUMERICIDENTIFIER]})\\.(${i[g.NUMERICIDENTIFIER]})\\.(${i[g.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[g.NUMERICIDENTIFIERLOOSE]})\\.(${i[g.NUMERICIDENTIFIERLOOSE]})\\.(${i[g.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[g.NUMERICIDENTIFIER]}|${i[g.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[g.NUMERICIDENTIFIERLOOSE]}|${i[g.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[g.PRERELEASEIDENTIFIER]}(?:\\.${i[g.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[g.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[g.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[g.BUILDIDENTIFIER]}(?:\\.${i[g.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[g.MAINVERSION]}${i[g.PRERELEASE]}?${i[g.BUILD]}?`),c("FULL",`^${i[g.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[g.MAINVERSIONLOOSE]}${i[g.PRERELEASELOOSE]}?${i[g.BUILD]}?`),c("LOOSE",`^${i[g.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[g.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[g.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[g.XRANGEIDENTIFIER]})(?:\\.(${i[g.XRANGEIDENTIFIER]})(?:\\.(${i[g.XRANGEIDENTIFIER]})(?:${i[g.PRERELEASE]})?${i[g.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[g.XRANGEIDENTIFIERLOOSE]})(?:${i[g.PRERELEASELOOSE]})?${i[g.BUILD]}?)?)?`),c("XRANGE",`^${i[g.GTLT]}\\s*${i[g.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[g.GTLT]}\\s*${i[g.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${p}})(?:\\.(\\d{1,${p}}))?(?:\\.(\\d{1,${p}}))?(?:$|[^\\d])`),c("COERCERTL",i[g.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[g.LONETILDE]}\\s+`,!0),f.tildeTrimReplace="$1~",c("TILDE",`^${i[g.LONETILDE]}${i[g.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[g.LONETILDE]}${i[g.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[g.LONECARET]}\\s+`,!0),f.caretTrimReplace="$1^",c("CARET",`^${i[g.LONECARET]}${i[g.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[g.LONECARET]}${i[g.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[g.GTLT]}\\s*(${i[g.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[g.GTLT]}\\s*(${i[g.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[g.GTLT]}\\s*(${i[g.LOOSEPLAIN]}|${i[g.XRANGEPLAIN]})`,!0),f.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[g.XRANGEPLAIN]})\\s+-\\s+(${i[g.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[g.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[g.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},42097:function(G,f,e){const p=e(86049),r=(u,i,g)=>p(u,i,">",g);G.exports=r},34298:function(G,f,e){const p=e(89061),r=(u,i,g)=>(u=new p(u,g),i=new p(i,g),u.intersects(i));G.exports=r},59850:function(G,f,e){const p=e(86049),r=(u,i,g)=>p(u,i,"<",g);G.exports=r},59290:function(G,f,e){const p=e(86244),r=e(89061),u=(i,g,a)=>{let c=null,v=null,m=null;try{m=new r(g,a)}catch{return null}return i.forEach(b=>{m.test(b)&&(!c||v.compare(b)===-1)&&(c=b,v=new p(c,a))}),c};G.exports=u},62465:function(G,f,e){const p=e(86244),r=e(89061),u=(i,g,a)=>{let c=null,v=null,m=null;try{m=new r(g,a)}catch{return null}return i.forEach(b=>{m.test(b)&&(!c||v.compare(b)===1)&&(c=b,v=new p(c,a))}),c};G.exports=u},91785:function(G,f,e){const p=e(86244),r=e(89061),u=e(81666),i=(g,a)=>{g=new r(g,a);let c=new p("0.0.0");if(g.test(c)||(c=new p("0.0.0-0"),g.test(c)))return c;c=null;for(let v=0;v<g.set.length;++v){const m=g.set[v];let b=null;m.forEach(N=>{const D=new p(N.semver.version);switch(N.operator){case">":D.prerelease.length===0?D.patch++:D.prerelease.push(0),D.raw=D.format();case"":case">=":(!b||u(D,b))&&(b=D);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${N.operator}`)}}),b&&(!c||u(c,b))&&(c=b)}return c&&g.test(c)?c:null};G.exports=i},86049:function(G,f,e){const p=e(86244),r=e(67801),{ANY:u}=r,i=e(89061),g=e(8139),a=e(81666),c=e(98771),v=e(77179),m=e(63041),b=(N,D,H,x)=>{N=new p(N,x),D=new i(D,x);let w,O,S,L,I;switch(H){case">":w=a,O=v,S=c,L=">",I=">=";break;case"<":w=c,O=m,S=a,L="<",I="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(g(N,D,x))return!1;for(let T=0;T<D.set.length;++T){const s=D.set[T];let l=null,h=null;if(s.forEach(E=>{E.semver===u&&(E=new r(">=0.0.0")),l=l||E,h=h||E,w(E.semver,l.semver,x)?l=E:S(E.semver,h.semver,x)&&(h=E)}),l.operator===L||l.operator===I||(!h.operator||h.operator===L)&&O(N,h.semver))return!1;if(h.operator===I&&S(N,h.semver))return!1}return!0};G.exports=b},29905:function(G,f,e){const p=e(8139),r=e(32641);G.exports=(u,i,g)=>{const a=[];let c=null,v=null;const m=u.sort((H,x)=>r(H,x,g));for(const H of m)p(H,i,g)?(v=H,c||(c=H)):(v&&a.push([c,v]),v=null,c=null);c&&a.push([c,null]);const b=[];for(const[H,x]of a)H===x?b.push(H):!x&&H===m[0]?b.push("*"):x?H===m[0]?b.push(`<=${x}`):b.push(`${H} - ${x}`):b.push(`>=${H}`);const N=b.join(" || "),D=typeof i.raw=="string"?i.raw:String(i);return N.length<D.length?N:i}},1254:function(G,f,e){const p=e(89061),r=e(67801),{ANY:u}=r,i=e(8139),g=e(32641),a=(b,N,D={})=>{if(b===N)return!0;b=new p(b,D),N=new p(N,D);let H=!1;e:for(const x of b.set){for(const w of N.set){const O=c(x,w,D);if(H=H||O!==null,O)continue e}if(H)return!1}return!0},c=(b,N,D)=>{if(b===N)return!0;if(b.length===1&&b[0].semver===u){if(N.length===1&&N[0].semver===u)return!0;D.includePrerelease?b=[new r(">=0.0.0-0")]:b=[new r(">=0.0.0")]}if(N.length===1&&N[0].semver===u){if(D.includePrerelease)return!0;N=[new r(">=0.0.0")]}const H=new Set;let x,w;for(const h of b)h.operator===">"||h.operator===">="?x=v(x,h,D):h.operator==="<"||h.operator==="<="?w=m(w,h,D):H.add(h.semver);if(H.size>1)return null;let O;if(x&&w){if(O=g(x.semver,w.semver,D),O>0)return null;if(O===0&&(x.operator!==">="||w.operator!=="<="))return null}for(const h of H){if(x&&!i(h,String(x),D)||w&&!i(h,String(w),D))return null;for(const E of N)if(!i(h,String(E),D))return!1;return!0}let S,L,I,T,s=w&&!D.includePrerelease&&w.semver.prerelease.length?w.semver:!1,l=x&&!D.includePrerelease&&x.semver.prerelease.length?x.semver:!1;s&&s.prerelease.length===1&&w.operator==="<"&&s.prerelease[0]===0&&(s=!1);for(const h of N){if(T=T||h.operator===">"||h.operator===">=",I=I||h.operator==="<"||h.operator==="<=",x){if(l&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===l.major&&h.semver.minor===l.minor&&h.semver.patch===l.patch&&(l=!1),h.operator===">"||h.operator===">="){if(S=v(x,h,D),S===h&&S!==x)return!1}else if(x.operator===">="&&!i(x.semver,String(h),D))return!1}if(w){if(s&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===s.major&&h.semver.minor===s.minor&&h.semver.patch===s.patch&&(s=!1),h.operator==="<"||h.operator==="<="){if(L=m(w,h,D),L===h&&L!==w)return!1}else if(w.operator==="<="&&!i(w.semver,String(h),D))return!1}if(!h.operator&&(w||x)&&O!==0)return!1}return!(x&&I&&!w&&O!==0||w&&T&&!x&&O!==0||l||s)},v=(b,N,D)=>{if(!b)return N;const H=g(b.semver,N.semver,D);return H>0?b:H<0||N.operator===">"&&b.operator===">="?N:b},m=(b,N,D)=>{if(!b)return N;const H=g(b.semver,N.semver,D);return H<0?b:H>0||N.operator==="<"&&b.operator==="<="?N:b};G.exports=a},92811:function(G,f,e){const p=e(89061),r=(u,i)=>new p(u,i).set.map(g=>g.map(a=>a.value).join(" ").trim().split(" "));G.exports=r},77855:function(G,f,e){const p=e(89061),r=(u,i)=>{try{return new p(u,i).range||"*"}catch{return null}};G.exports=r},76358:function(G,f,e){"use strict";e.r(f),e.d(f,{AccountNameRequiredError:function(){return v},AccountNotSupported:function(){return m},AmountRequired:function(){return b},BluetoothRequired:function(){return N},BtcUnmatchedApp:function(){return D},CantOpenDevice:function(){return H},CantScanQRCode:function(){return Vt},CashAddrNotSupported:function(){return x},CurrencyNotSupported:function(){return w},DBNotReset:function(){return sr},DBWrongPassword:function(){return Tt},DeviceAppVerifyNotSupported:function(){return O},DeviceGenuineSocketEarlyClose:function(){return S},DeviceHalted:function(){return l},DeviceInOSUExpected:function(){return s},DeviceNameInvalid:function(){return h},DeviceNotGenuineError:function(){return L},DeviceOnDashboardExpected:function(){return I},DeviceOnDashboardUnexpected:function(){return T},DeviceShouldStayInApp:function(){return Ke},DeviceSocketFail:function(){return E},DeviceSocketNoBulkStatus:function(){return j},DisconnectedDevice:function(){return F},DisconnectedDeviceDuringOperation:function(){return W},ETHAddressNonEIP:function(){return at},EnpointConfigError:function(){return d},EthAppPleaseEnableContractData:function(){return A},FeeEstimationFailed:function(){return k},FeeNotLoaded:function(){return Bt},FeeRequired:function(){return Nt},FeeTooHigh:function(){return lt},FirmwareNotRecognized:function(){return M},FirmwareOrAppUpdateRequired:function(){return Je},GasLessThanEstimate:function(){return et},GenuineCheckFailed:function(){return Ze},HardResetFail:function(){return U},InvalidAddress:function(){return V},InvalidAddressBecauseDestinationIsAlsoSource:function(){return Q},InvalidXRPTag:function(){return z},LatestMCUInstalledError:function(){return Z},LedgerAPI4xx:function(){return Gt},LedgerAPI5xx:function(){return Ft},LedgerAPIError:function(){return X},LedgerAPIErrorWithMessage:function(){return q},LedgerAPINotAvailable:function(){return te},MCUNotGenuineToDashboard:function(){return Ye},ManagerAppAlreadyInstalledError:function(){return re},ManagerAppDepInstallRequired:function(){return ne},ManagerAppDepUninstallRequired:function(){return be},ManagerAppRelyOnBTCError:function(){return se},ManagerDeviceLockedError:function(){return le},ManagerFirmwareNotEnoughSpaceError:function(){return fe},ManagerNotEnoughSpaceError:function(){return ce},ManagerUninstallBTCDep:function(){return pe},NetworkDown:function(){return Te},NoAccessToCamera:function(){return qe},NoAddressesFound:function(){return Ee},NoDBPathGiven:function(){return St},NotEnoughBalance:function(){return xe},NotEnoughBalanceBecauseDestinationNotCreated:function(){return Pt},NotEnoughBalanceInParentAccount:function(){return gt},NotEnoughBalanceToDelegate:function(){return je},NotEnoughGas:function(){return Ie},NotEnoughSpendableBalance:function(){return mt},NotSupportedLegacyAddress:function(){return At},PairingFailed:function(){return Kt},PasswordIncorrectError:function(){return Pe},PasswordsDontMatchError:function(){return ar},RecipientRequired:function(){return Ht},RecommendSubAccountsToEmpty:function(){return Ct},RecommendUndelegation:function(){return Rt},StatusCodes:function(){return dt},SyncError:function(){return jt},TimeoutTagged:function(){return zt},TransportError:function(){return ft},TransportInterfaceNotAvailable:function(){return Fe},TransportOpenUserCancelled:function(){return Wt},TransportRaceCondition:function(){return Et},TransportStatusError:function(){return ht},TransportWebUSBGestureRequired:function(){return rt},UnavailableTezosOriginatedAccountReceive:function(){return yt},UnavailableTezosOriginatedAccountSend:function(){return Re},UnexpectedBootloader:function(){return Xe},UnknownMCU:function(){return J},UpdateFetchFileFail:function(){return He},UpdateIncorrectHash:function(){return xt},UpdateIncorrectSig:function(){return tt},UpdateYourApp:function(){return Qe},UserRefusedAddress:function(){return ct},UserRefusedAllowManager:function(){return We},UserRefusedDeviceNameChange:function(){return It},UserRefusedFirmwareUpdate:function(){return bt},UserRefusedOnDevice:function(){return Ve},WebsocketConnectionError:function(){return nt},WebsocketConnectionFailed:function(){return wt},WrongAppForCurrency:function(){return it},WrongDeviceForAccount:function(){return Dt},addCustomErrorDeserializer:function(){return u},createCustomErrorClass:function(){return i},deserializeError:function(){return g},getAltStatusMessage:function(){return st},serializeError:function(){return a}});var p={},r={},u=function(de,Oe){r[de]=Oe},i=function(de){var Oe=function(Me,Be){Object.assign(this,Be),this.name=de,this.message=Me||de,this.stack=new Error().stack};return Oe.prototype=new Error,p[de]=Oe,Oe},g=function(de){if(typeof de=="object"&&de){try{var Oe=JSON.parse(de.message);Oe.message&&Oe.name&&(de=Oe)}catch{}var Ae=void 0;if(typeof de.name=="string"){var Me=de.name,Be=r[Me];if(Be)Ae=Be(de);else{var Ne=Me==="Error"?Error:p[Me];Ne||(console.warn("deserializing an unknown class '"+Me+"'"),Ne=i(Me)),Ae=Object.create(Ne.prototype);try{for(var Le in de)de.hasOwnProperty(Le)&&(Ae[Le]=de[Le])}catch{}}}else Ae=new Error(de.message);return!Ae.stack&&Error.captureStackTrace&&Error.captureStackTrace(Ae,g),Ae}return new Error(String(de))},a=function(de){return de&&(typeof de=="object"?c(de,[]):typeof de=="function"?"[Function: "+(de.name||"anonymous")+"]":de)};function c(de,Oe){var Ae={};Oe.push(de);for(var Me=0,Be=Object.keys(de);Me<Be.length;Me++){var Ne=Be[Me],Le=de[Ne];if(typeof Le!="function"){if(!Le||typeof Le!="object"){Ae[Ne]=Le;continue}if(Oe.indexOf(de[Ne])===-1){Ae[Ne]=c(de[Ne],Oe.slice(0));continue}Ae[Ne]="[Circular]"}}return typeof de.name=="string"&&(Ae.name=de.name),typeof de.message=="string"&&(Ae.message=de.message),typeof de.stack=="string"&&(Ae.stack=de.stack),Ae}var v=i("AccountNameRequired"),m=i("AccountNotSupported"),b=i("AmountRequired"),N=i("BluetoothRequired"),D=i("BtcUnmatchedApp"),H=i("CantOpenDevice"),x=i("CashAddrNotSupported"),w=i("CurrencyNotSupported"),O=i("DeviceAppVerifyNotSupported"),S=i("DeviceGenuineSocketEarlyClose"),L=i("DeviceNotGenuine"),I=i("DeviceOnDashboardExpected"),T=i("DeviceOnDashboardUnexpected"),s=i("DeviceInOSUExpected"),l=i("DeviceHalted"),h=i("DeviceNameInvalid"),E=i("DeviceSocketFail"),j=i("DeviceSocketNoBulkStatus"),F=i("DisconnectedDevice"),W=i("DisconnectedDeviceDuringOperation"),d=i("EnpointConfig"),A=i("EthAppPleaseEnableContractData"),k=i("FeeEstimationFailed"),M=i("FirmwareNotRecognized"),U=i("HardResetFail"),z=i("InvalidXRPTag"),V=i("InvalidAddress"),Q=i("InvalidAddressBecauseDestinationIsAlsoSource"),Z=i("LatestMCUInstalledError"),J=i("UnknownMCU"),X=i("LedgerAPIError"),q=i("LedgerAPIErrorWithMessage"),te=i("LedgerAPINotAvailable"),re=i("ManagerAppAlreadyInstalled"),se=i("ManagerAppRelyOnBTC"),ne=i("ManagerAppDepInstallRequired"),be=i("ManagerAppDepUninstallRequired"),le=i("ManagerDeviceLocked"),fe=i("ManagerFirmwareNotEnoughSpace"),ce=i("ManagerNotEnoughSpace"),pe=i("ManagerUninstallBTCDep"),Te=i("NetworkDown"),Ee=i("NoAddressesFound"),xe=i("NotEnoughBalance"),je=i("NotEnoughBalanceToDelegate"),gt=i("NotEnoughBalanceInParentAccount"),mt=i("NotEnoughSpendableBalance"),Pt=i("NotEnoughBalanceBecauseDestinationNotCreated"),qe=i("NoAccessToCamera"),Ie=i("NotEnoughGas"),At=i("NotSupportedLegacyAddress"),et=i("GasLessThanEstimate"),ar=i("PasswordsDontMatch"),Pe=i("PasswordIncorrect"),Ct=i("RecommendSubAccountsToEmpty"),Rt=i("RecommendUndelegation"),zt=i("TimeoutTagged"),Xe=i("UnexpectedBootloader"),Ye=i("MCUNotGenuineToDashboard"),Ht=i("RecipientRequired"),yt=i("UnavailableTezosOriginatedAccountReceive"),Re=i("UnavailableTezosOriginatedAccountSend"),He=i("UpdateFetchFileFail"),xt=i("UpdateIncorrectHash"),tt=i("UpdateIncorrectSig"),Qe=i("UpdateYourApp"),It=i("UserRefusedDeviceNameChange"),ct=i("UserRefusedAddress"),bt=i("UserRefusedFirmwareUpdate"),We=i("UserRefusedAllowManager"),Ve=i("UserRefusedOnDevice"),Wt=i("TransportOpenUserCancelled"),Fe=i("TransportInterfaceNotAvailable"),Et=i("TransportRaceCondition"),rt=i("TransportWebUSBGestureRequired"),Ke=i("DeviceShouldStayInApp"),nt=i("WebsocketConnectionError"),wt=i("WebsocketConnectionFailed"),Dt=i("WrongDeviceForAccount"),it=i("WrongAppForCurrency"),at=i("ETHAddressNonEIP"),Vt=i("CantScanQRCode"),Bt=i("FeeNotLoaded"),Nt=i("FeeRequired"),lt=i("FeeTooHigh"),jt=i("SyncError"),Kt=i("PairingFailed"),Ze=i("GenuineCheckFailed"),Gt=i("LedgerAPI4xx"),Ft=i("LedgerAPI5xx"),Je=i("FirmwareOrAppUpdateRequired"),St=i("NoDBPathGiven"),Tt=i("DBWrongPassword"),sr=i("DBNotReset");function ft(de,Oe){this.name="TransportError",this.message=de,this.stack=new Error().stack,this.id=Oe}ft.prototype=new Error,u("TransportError",function(de){return new ft(de.message,de.id)});var dt={PIN_REMAINING_ATTEMPTS:25536,INCORRECT_LENGTH:26368,MISSING_CRITICAL_PARAMETER:26624,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,SECURITY_STATUS_NOT_SATISFIED:27010,CONDITIONS_OF_USE_NOT_SATISFIED:27013,INCORRECT_DATA:27264,NOT_ENOUGH_MEMORY_SPACE:27268,REFERENCED_DATA_NOT_FOUND:27272,FILE_ALREADY_EXISTS:27273,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,CLA_NOT_SUPPORTED:28160,TECHNICAL_PROBLEM:28416,OK:36864,MEMORY_PROBLEM:37440,NO_EF_SELECTED:37888,INVALID_OFFSET:37890,FILE_NOT_FOUND:37892,INCONSISTENT_FILE:37896,ALGORITHM_NOT_SUPPORTED:38020,INVALID_KCV:38021,CODE_NOT_INITIALIZED:38914,ACCESS_CONDITION_NOT_FULFILLED:38916,CONTRADICTION_SECRET_CODE_STATUS:38920,CONTRADICTION_INVALIDATION:38928,CODE_BLOCKED:38976,MAX_VALUE_REACHED:38992,GP_AUTH_FAILED:25344,LICENSING:28482,HALTED:28586};function st(de){switch(de){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received"}if(28416<=de&&de<=28671)return"Internal error, please report"}function ht(de){this.name="TransportStatusError";var Oe=Object.keys(dt).find(function(Be){return dt[Be]===de})||"UNKNOWN_ERROR",Ae=st(de)||Oe,Me=de.toString(16);this.message="Ledger device: "+Ae+" (0x"+Me+")",this.stack=new Error().stack,this.statusCode=de,this.statusText=Oe}ht.prototype=new Error,u("TransportStatusError",function(de){return new ht(de.statusCode)})},93298:function(G,f,e){"use strict";e.d(f,{Z:function(){return w}});var p=e(71823),r=e.n(p),u=e(27590),i=e(28716),g=e(76358),a=e(48764).Buffer;function c(O,S,L){const I=new g.TransportError(S,L);return I.originalError=O,I}function v(O,S){const L=a.alloc(O.length);for(let I=0;I<O.length;I++)L[I]=O[I]^S[I%S.length];return L}const m=O=>O.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),b=O=>O.replace(/-/g,"+").replace(/_/g,"/")+"==".substring(0,3*O.length%4);function N(O,S,L,I){const T=v(O,L),s=a.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),l={version:"U2F_V2",keyHandle:m(T.toString("base64")),challenge:m(s.toString("base64")),appId:location.origin};return(0,i.log)("apdu","=> "+O.toString("hex")),(0,p.sign)(l,S/1e3).then(h=>{const{signatureData:E}=h;if(typeof E=="string"){const j=a.from(b(E),"base64");let F;return I?F=j.slice(5):F=j,(0,i.log)("apdu","<= "+F.toString("hex")),F}else throw h})}let D=[];function H(){D.forEach(O=>O.emit("disconnect")),D=[]}function x(O){return O.metaData.code===5}class w extends u.ZP{static async open(S,L=5e3){return new w}constructor(){super(),this.scrambleKey=void 0,this.unwrap=!0,D.push(this)}async exchange(S){try{return await N(S,this.exchangeTimeout,this.scrambleKey,this.unwrap)}catch(L){throw typeof L.metaData=="object"?(x(L)&&H(),c(L,"Failed to sign with Ledger device: U2F "+L.metaData.type,"U2F_"+L.metaData.code)):L}}setScrambleKey(S){this.scrambleKey=a.from(S,"ascii")}setUnwrap(S){this.unwrap=S}close(){return Promise.resolve()}}w.isSupported=p.isSupported,w.list=()=>(0,p.isSupported)().then(O=>O?[null]:[]),w.listen=O=>{let S=!1;return(0,p.isSupported)().then(L=>{S||(L?(O.next({type:"add",descriptor:null}),O.complete()):O.error(new g.TransportError("U2F browser support is needed for Ledger. Please use Chrome, Opera or Firefox with a U2F extension. Also make sure you're on an HTTPS connection","U2FNotSupported")))}),{unsubscribe:()=>{S=!0}}}},68277:function(G,f,e){"use strict";e.d(f,{Z:function(){return _e}});var p=e(27590),r=e(76358),u=e(28371),i=e.n(u);const g=1,a=2,c=4,v=8,m=16,b={blue:{id:"blue",productName:"Ledger\xA0Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:480*1024,blockSize:4*1024,getBlockSize:C=>4*1024},nanoS:{id:"nanoS",productName:"Ledger\xA0Nano\xA0S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:320*1024,blockSize:4*1024,getBlockSize:C=>i().lt(i().coerce(C),"2.0.0")?4*1024:2*1024},nanoX:{id:"nanoX",productName:"Ledger\xA0Nano\xA0X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,blockSize:4*1024,getBlockSize:C=>4*1024,bluetoothSpec:[{serviceUuid:"d973f2e0-b19e-11e2-9e96-0800200c9a66",notifyUuid:"d973f2e1-b19e-11e2-9e96-0800200c9a66",writeUuid:"d973f2e2-b19e-11e2-9e96-0800200c9a66"},{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572"}]}},N={Blue:"blue","Nano S":"nanoS","Nano X":"nanoX"},D=Object.values(b),H=11415,x=C=>{const B=b[C];if(!B)throw new Error("device '"+C+"' does not exist");return B},w=C=>{const B=D.find(Y=>Y.legacyUsbProductId===C);if(B)return B;const P=C>>8;return D.find(Y=>Y.productIdMM===P)},O=C=>{const B=N[C];return D.find(K=>K.id===B)},S=[],L={};for(let C in b){const B=b[C],{bluetoothSpec:P}=B;if(P)for(let K=0;K<P.length;K++){const Y=P[K];S.push(Y.serviceUuid),L[Y.serviceUuid]=L[Y.serviceUuid.replace(/-/g,"")]={deviceModel:B,...Y}}}const I=()=>S,T=C=>L[C.toLowerCase()];var s=e(37741),l=e(53732),h=e(28716);/*! *****************************************************************************
17
+ Copyright (c) Microsoft Corporation.
18
+
19
+ Permission to use, copy, modify, and/or distribute this software for any
20
+ purpose with or without fee is hereby granted.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
23
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
25
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
26
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
27
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28
+ PERFORMANCE OF THIS SOFTWARE.
29
+ ***************************************************************************** */var E=function(C,B){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,K){P.__proto__=K}||function(P,K){for(var Y in K)K.hasOwnProperty(Y)&&(P[Y]=K[Y])},E(C,B)};function j(C,B){E(C,B);function P(){this.constructor=C}C.prototype=B===null?Object.create(B):(P.prototype=B.prototype,new P)}var F=function(){return F=Object.assign||function(B){for(var P,K=1,Y=arguments.length;K<Y;K++){P=arguments[K];for(var _ in P)Object.prototype.hasOwnProperty.call(P,_)&&(B[_]=P[_])}return B},F.apply(this,arguments)};function W(C,B){var P={};for(var K in C)Object.prototype.hasOwnProperty.call(C,K)&&B.indexOf(K)<0&&(P[K]=C[K]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Y=0,K=Object.getOwnPropertySymbols(C);Y<K.length;Y++)B.indexOf(K[Y])<0&&Object.prototype.propertyIsEnumerable.call(C,K[Y])&&(P[K[Y]]=C[K[Y]]);return P}function d(C,B,P,K){var Y=arguments.length,_=Y<3?B:K===null?K=Object.getOwnPropertyDescriptor(B,P):K,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(C,B,P,K);else for(var ve=C.length-1;ve>=0;ve--)(ae=C[ve])&&(_=(Y<3?ae(_):Y>3?ae(B,P,_):ae(B,P))||_);return Y>3&&_&&Object.defineProperty(B,P,_),_}function A(C,B){return function(P,K){B(P,K,C)}}function k(C,B){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(C,B)}function M(C,B,P,K){function Y(_){return _ instanceof P?_:new P(function(ae){ae(_)})}return new(P||(P=Promise))(function(_,ae){function ve(Ce){try{ye(K.next(Ce))}catch(De){ae(De)}}function we(Ce){try{ye(K.throw(Ce))}catch(De){ae(De)}}function ye(Ce){Ce.done?_(Ce.value):Y(Ce.value).then(ve,we)}ye((K=K.apply(C,B||[])).next())})}function U(C,B){var P={label:0,sent:function(){if(_[0]&1)throw _[1];return _[1]},trys:[],ops:[]},K,Y,_,ae;return ae={next:ve(0),throw:ve(1),return:ve(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function ve(ye){return function(Ce){return we([ye,Ce])}}function we(ye){if(K)throw new TypeError("Generator is already executing.");for(;P;)try{if(K=1,Y&&(_=ye[0]&2?Y.return:ye[0]?Y.throw||((_=Y.return)&&_.call(Y),0):Y.next)&&!(_=_.call(Y,ye[1])).done)return _;switch(Y=0,_&&(ye=[ye[0]&2,_.value]),ye[0]){case 0:case 1:_=ye;break;case 4:return P.label++,{value:ye[1],done:!1};case 5:P.label++,Y=ye[1],ye=[0];continue;case 7:ye=P.ops.pop(),P.trys.pop();continue;default:if(_=P.trys,!(_=_.length>0&&_[_.length-1])&&(ye[0]===6||ye[0]===2)){P=0;continue}if(ye[0]===3&&(!_||ye[1]>_[0]&&ye[1]<_[3])){P.label=ye[1];break}if(ye[0]===6&&P.label<_[1]){P.label=_[1],_=ye;break}if(_&&P.label<_[2]){P.label=_[2],P.ops.push(ye);break}_[2]&&P.ops.pop(),P.trys.pop();continue}ye=B.call(C,P)}catch(Ce){ye=[6,Ce],Y=0}finally{K=_=0}if(ye[0]&5)throw ye[1];return{value:ye[0]?ye[1]:void 0,done:!0}}}function z(C,B,P,K){K===void 0&&(K=P),C[K]=B[P]}function V(C,B){for(var P in C)P!=="default"&&!B.hasOwnProperty(P)&&(B[P]=C[P])}function Q(C){var B=typeof Symbol=="function"&&Symbol.iterator,P=B&&C[B],K=0;if(P)return P.call(C);if(C&&typeof C.length=="number")return{next:function(){return C&&K>=C.length&&(C=void 0),{value:C&&C[K++],done:!C}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(C,B){var P=typeof Symbol=="function"&&C[Symbol.iterator];if(!P)return C;var K=P.call(C),Y,_=[],ae;try{for(;(B===void 0||B-- >0)&&!(Y=K.next()).done;)_.push(Y.value)}catch(ve){ae={error:ve}}finally{try{Y&&!Y.done&&(P=K.return)&&P.call(K)}finally{if(ae)throw ae.error}}return _}function J(){for(var C=[],B=0;B<arguments.length;B++)C=C.concat(Z(arguments[B]));return C}function X(){for(var C=0,B=0,P=arguments.length;B<P;B++)C+=arguments[B].length;for(var K=Array(C),Y=0,B=0;B<P;B++)for(var _=arguments[B],ae=0,ve=_.length;ae<ve;ae++,Y++)K[Y]=_[ae];return K}function q(C){return this instanceof q?(this.v=C,this):new q(C)}function te(C,B,P){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var K=P.apply(C,B||[]),Y,_=[];return Y={},ae("next"),ae("throw"),ae("return"),Y[Symbol.asyncIterator]=function(){return this},Y;function ae(Se){K[Se]&&(Y[Se]=function($e){return new Promise(function(pt,ze){_.push([Se,$e,pt,ze])>1||ve(Se,$e)})})}function ve(Se,$e){try{we(K[Se]($e))}catch(pt){De(_[0][3],pt)}}function we(Se){Se.value instanceof q?Promise.resolve(Se.value.v).then(ye,Ce):De(_[0][2],Se)}function ye(Se){ve("next",Se)}function Ce(Se){ve("throw",Se)}function De(Se,$e){Se($e),_.shift(),_.length&&ve(_[0][0],_[0][1])}}function re(C){var B,P;return B={},K("next"),K("throw",function(Y){throw Y}),K("return"),B[Symbol.iterator]=function(){return this},B;function K(Y,_){B[Y]=C[Y]?function(ae){return(P=!P)?{value:q(C[Y](ae)),done:Y==="return"}:_?_(ae):ae}:_}}function se(C){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B=C[Symbol.asyncIterator],P;return B?B.call(C):(C=typeof Q=="function"?Q(C):C[Symbol.iterator](),P={},K("next"),K("throw"),K("return"),P[Symbol.asyncIterator]=function(){return this},P);function K(_){P[_]=C[_]&&function(ae){return new Promise(function(ve,we){ae=C[_](ae),Y(ve,we,ae.done,ae.value)})}}function Y(_,ae,ve,we){Promise.resolve(we).then(function(ye){_({value:ye,done:ve})},ae)}}function ne(C,B){return Object.defineProperty?Object.defineProperty(C,"raw",{value:B}):C.raw=B,C}function be(C){if(C&&C.__esModule)return C;var B={};if(C!=null)for(var P in C)Object.hasOwnProperty.call(C,P)&&(B[P]=C[P]);return B.default=C,B}function le(C){return C&&C.__esModule?C:{default:C}}function fe(C,B){if(!B.has(C))throw new TypeError("attempted to get private field on non-instance");return B.get(C)}function ce(C,B,P){if(!B.has(C))throw new TypeError("attempted to set private field on non-instance");return B.set(C,P),P}function pe(C){return typeof C=="function"}var Te=!1,Ee={Promise:void 0,set useDeprecatedSynchronousErrorHandling(C){if(C){var B=new Error;""+B.stack}Te=C},get useDeprecatedSynchronousErrorHandling(){return Te}};function xe(C){setTimeout(function(){throw C},0)}var je={closed:!0,next:function(C){},error:function(C){if(Ee.useDeprecatedSynchronousErrorHandling)throw C;xe(C)},complete:function(){}},gt=function(){return Array.isArray||function(C){return C&&typeof C.length=="number"}}();function mt(C){return C!==null&&typeof C=="object"}var Pt=function(){function C(B){return Error.call(this),this.message=B?B.length+` errors occurred during unsubscription:
30
+ `+B.map(function(P,K){return K+1+") "+P.toString()}).join(`
31
+ `):"",this.name="UnsubscriptionError",this.errors=B,this}return C.prototype=Object.create(Error.prototype),C}(),qe=Pt,Ie=function(){function C(B){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,B&&(this._ctorUnsubscribe=!0,this._unsubscribe=B)}return C.prototype.unsubscribe=function(){var B;if(!this.closed){var P=this,K=P._parentOrParents,Y=P._ctorUnsubscribe,_=P._unsubscribe,ae=P._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,K instanceof C)K.remove(this);else if(K!==null)for(var ve=0;ve<K.length;++ve){var we=K[ve];we.remove(this)}if(pe(_)){Y&&(this._unsubscribe=void 0);try{_.call(this)}catch(De){B=De instanceof qe?At(De.errors):[De]}}if(gt(ae))for(var ve=-1,ye=ae.length;++ve<ye;){var Ce=ae[ve];if(mt(Ce))try{Ce.unsubscribe()}catch(Se){B=B||[],Se instanceof qe?B=B.concat(At(Se.errors)):B.push(Se)}}if(B)throw new qe(B)}},C.prototype.add=function(B){var P=B;if(!B)return C.EMPTY;switch(typeof B){case"function":P=new C(B);case"object":if(P===this||P.closed||typeof P.unsubscribe!="function")return P;if(this.closed)return P.unsubscribe(),P;if(!(P instanceof C)){var K=P;P=new C,P._subscriptions=[K]}break;default:throw new Error("unrecognized teardown "+B+" added to Subscription.")}var Y=P._parentOrParents;if(Y===null)P._parentOrParents=this;else if(Y instanceof C){if(Y===this)return P;P._parentOrParents=[Y,this]}else if(Y.indexOf(this)===-1)Y.push(this);else return P;var _=this._subscriptions;return _===null?this._subscriptions=[P]:_.push(P),P},C.prototype.remove=function(B){var P=this._subscriptions;if(P){var K=P.indexOf(B);K!==-1&&P.splice(K,1)}},C.EMPTY=function(B){return B.closed=!0,B}(new C),C}();function At(C){return C.reduce(function(B,P){return B.concat(P instanceof qe?P.errors:P)},[])}var et=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),ar=null,Pe=function(C){j(B,C);function B(P,K,Y){var _=C.call(this)||this;switch(_.syncErrorValue=null,_.syncErrorThrown=!1,_.syncErrorThrowable=!1,_.isStopped=!1,arguments.length){case 0:_.destination=je;break;case 1:if(!P){_.destination=je;break}if(typeof P=="object"){P instanceof B?(_.syncErrorThrowable=P.syncErrorThrowable,_.destination=P,P.add(_)):(_.syncErrorThrowable=!0,_.destination=new Ct(_,P));break}default:_.syncErrorThrowable=!0,_.destination=new Ct(_,P,K,Y);break}return _}return B.prototype[et]=function(){return this},B.create=function(P,K,Y){var _=new B(P,K,Y);return _.syncErrorThrowable=!1,_},B.prototype.next=function(P){this.isStopped||this._next(P)},B.prototype.error=function(P){this.isStopped||(this.isStopped=!0,this._error(P))},B.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},B.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,C.prototype.unsubscribe.call(this))},B.prototype._next=function(P){this.destination.next(P)},B.prototype._error=function(P){this.destination.error(P),this.unsubscribe()},B.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},B.prototype._unsubscribeAndRecycle=function(){var P=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=P,this},B}(Ie),Ct=function(C){j(B,C);function B(P,K,Y,_){var ae=C.call(this)||this;ae._parentSubscriber=P;var ve,we=ae;return pe(K)?ve=K:K&&(ve=K.next,Y=K.error,_=K.complete,K!==je&&(we=Object.create(K),pe(we.unsubscribe)&&ae.add(we.unsubscribe.bind(we)),we.unsubscribe=ae.unsubscribe.bind(ae))),ae._context=we,ae._next=ve,ae._error=Y,ae._complete=_,ae}return B.prototype.next=function(P){if(!this.isStopped&&this._next){var K=this._parentSubscriber;!Ee.useDeprecatedSynchronousErrorHandling||!K.syncErrorThrowable?this.__tryOrUnsub(this._next,P):this.__tryOrSetError(K,this._next,P)&&this.unsubscribe()}},B.prototype.error=function(P){if(!this.isStopped){var K=this._parentSubscriber,Y=Ee.useDeprecatedSynchronousErrorHandling;if(this._error)!Y||!K.syncErrorThrowable?(this.__tryOrUnsub(this._error,P),this.unsubscribe()):(this.__tryOrSetError(K,this._error,P),this.unsubscribe());else if(K.syncErrorThrowable)Y?(K.syncErrorValue=P,K.syncErrorThrown=!0):xe(P),this.unsubscribe();else{if(this.unsubscribe(),Y)throw P;xe(P)}}},B.prototype.complete=function(){var P=this;if(!this.isStopped){var K=this._parentSubscriber;if(this._complete){var Y=function(){return P._complete.call(P._context)};!Ee.useDeprecatedSynchronousErrorHandling||!K.syncErrorThrowable?(this.__tryOrUnsub(Y),this.unsubscribe()):(this.__tryOrSetError(K,Y),this.unsubscribe())}else this.unsubscribe()}},B.prototype.__tryOrUnsub=function(P,K){try{P.call(this._context,K)}catch(Y){if(this.unsubscribe(),Ee.useDeprecatedSynchronousErrorHandling)throw Y;xe(Y)}},B.prototype.__tryOrSetError=function(P,K,Y){if(!Ee.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{K.call(this._context,Y)}catch(_){return Ee.useDeprecatedSynchronousErrorHandling?(P.syncErrorValue=_,P.syncErrorThrown=!0,!0):(xe(_),!0)}return!1},B.prototype._unsubscribe=function(){var P=this._parentSubscriber;this._context=null,this._parentSubscriber=null,P.unsubscribe()},B}(Pe);function Rt(C){for(;C;){var B=C,P=B.closed,K=B.destination,Y=B.isStopped;if(P||Y)return!1;K&&K instanceof Pe?C=K:C=null}return!0}function zt(C,B,P){if(C){if(C instanceof Pe)return C;if(C[et])return C[et]()}return!C&&!B&&!P?new Pe(je):new Pe(C,B,P)}var Xe=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ye(C){return C}function Ht(){for(var C=[],B=0;B<arguments.length;B++)C[B]=arguments[B];return yt(C)}function yt(C){return C.length===0?Ye:C.length===1?C[0]:function(P){return C.reduce(function(K,Y){return Y(K)},P)}}var Re=function(){function C(B){this._isScalar=!1,B&&(this._subscribe=B)}return C.prototype.lift=function(B){var P=new C;return P.source=this,P.operator=B,P},C.prototype.subscribe=function(B,P,K){var Y=this.operator,_=zt(B,P,K);if(Y?_.add(Y.call(_,this.source)):_.add(this.source||Ee.useDeprecatedSynchronousErrorHandling&&!_.syncErrorThrowable?this._subscribe(_):this._trySubscribe(_)),Ee.useDeprecatedSynchronousErrorHandling&&_.syncErrorThrowable&&(_.syncErrorThrowable=!1,_.syncErrorThrown))throw _.syncErrorValue;return _},C.prototype._trySubscribe=function(B){try{return this._subscribe(B)}catch(P){Ee.useDeprecatedSynchronousErrorHandling&&(B.syncErrorThrown=!0,B.syncErrorValue=P),Rt(B)?B.error(P):console.warn(P)}},C.prototype.forEach=function(B,P){var K=this;return P=He(P),new P(function(Y,_){var ae;ae=K.subscribe(function(ve){try{B(ve)}catch(we){_(we),ae&&ae.unsubscribe()}},_,Y)})},C.prototype._subscribe=function(B){var P=this.source;return P&&P.subscribe(B)},C.prototype[Xe]=function(){return this},C.prototype.pipe=function(){for(var B=[],P=0;P<arguments.length;P++)B[P]=arguments[P];return B.length===0?this:yt(B)(this)},C.prototype.toPromise=function(B){var P=this;return B=He(B),new B(function(K,Y){var _;P.subscribe(function(ae){return _=ae},function(ae){return Y(ae)},function(){return K(_)})})},C.create=function(B){return new C(B)},C}();function He(C){if(C||(C=Ee.Promise||Promise),!C)throw new Error("no Promise impl found");return C}function xt(C){return C&&typeof C.schedule=="function"}function tt(C,B){return function(K){if(typeof C!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return K.lift(new Qe(C,B))}}var Qe=function(){function C(B,P){this.project=B,this.thisArg=P}return C.prototype.call=function(B,P){return P.subscribe(new It(B,this.project,this.thisArg))},C}(),It=function(C){j(B,C);function B(P,K,Y){var _=C.call(this,P)||this;return _.project=K,_.count=0,_.thisArg=Y||_,_}return B.prototype._next=function(P){var K;try{K=this.project.call(this.thisArg,P,this.count++)}catch(Y){this.destination.error(Y);return}this.destination.next(K)},B}(Pe),ct=function(C){return function(B){for(var P=0,K=C.length;P<K&&!B.closed;P++)B.next(C[P]);B.complete()}},bt=function(C){return function(B){return C.then(function(P){B.closed||(B.next(P),B.complete())},function(P){return B.error(P)}).then(null,xe),B}};function We(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ve=We(),Wt=null,Fe=function(C){return function(B){var P=C[Ve]();do{var K=void 0;try{K=P.next()}catch(Y){return B.error(Y),B}if(K.done){B.complete();break}if(B.next(K.value),B.closed)break}while(!0);return typeof P.return=="function"&&B.add(function(){P.return&&P.return()}),B}},Et=function(C){return function(B){var P=C[Xe]();if(typeof P.subscribe!="function")throw new TypeError("Provided object does not correctly implement Symbol.observable");return P.subscribe(B)}},rt=function(C){return C&&typeof C.length=="number"&&typeof C!="function"};function Ke(C){return!!C&&typeof C.subscribe!="function"&&typeof C.then=="function"}var nt=function(C){if(!!C&&typeof C[Xe]=="function")return Et(C);if(rt(C))return ct(C);if(Ke(C))return bt(C);if(!!C&&typeof C[Ve]=="function")return Fe(C);var B=mt(C)?"an invalid object":"'"+C+"'",P="You provided "+B+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(P)};function wt(C,B){return new Re(function(P){var K=new Ie;return K.add(B.schedule(function(){var Y=C[Xe]();K.add(Y.subscribe({next:function(_){K.add(B.schedule(function(){return P.next(_)}))},error:function(_){K.add(B.schedule(function(){return P.error(_)}))},complete:function(){K.add(B.schedule(function(){return P.complete()}))}}))})),K})}function Dt(C,B){return new Re(function(P){var K=new Ie;return K.add(B.schedule(function(){return C.then(function(Y){K.add(B.schedule(function(){P.next(Y),K.add(B.schedule(function(){return P.complete()}))}))},function(Y){K.add(B.schedule(function(){return P.error(Y)}))})})),K})}function it(C,B){return new Re(function(P){var K=new Ie,Y=0;return K.add(B.schedule(function(){if(Y===C.length){P.complete();return}P.next(C[Y++]),P.closed||K.add(this.schedule())})),K})}function at(C,B){if(!C)throw new Error("Iterable cannot be null");return new Re(function(P){var K=new Ie,Y;return K.add(function(){Y&&typeof Y.return=="function"&&Y.return()}),K.add(B.schedule(function(){Y=C[Ve](),K.add(B.schedule(function(){if(!P.closed){var _,ae;try{var ve=Y.next();_=ve.value,ae=ve.done}catch(we){P.error(we);return}ae?P.complete():(P.next(_),this.schedule())}}))})),K})}function Vt(C){return C&&typeof C[Xe]=="function"}function Bt(C){return C&&typeof C[Ve]=="function"}function Nt(C,B){if(C!=null){if(Vt(C))return wt(C,B);if(Ke(C))return Dt(C,B);if(rt(C))return it(C,B);if(Bt(C)||typeof C=="string")return at(C,B)}throw new TypeError((C!==null&&typeof C||C)+" is not observable")}function lt(C,B){return B?Nt(C,B):C instanceof Re?C:new Re(nt(C))}var jt=function(C){j(B,C);function B(P){var K=C.call(this)||this;return K.parent=P,K}return B.prototype._next=function(P){this.parent.notifyNext(P)},B.prototype._error=function(P){this.parent.notifyError(P),this.unsubscribe()},B.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},B}(Pe),Kt=function(C){j(B,C);function B(P,K,Y){var _=C.call(this)||this;return _.parent=P,_.outerValue=K,_.outerIndex=Y,_}return B.prototype._next=function(P){this.parent.notifyNext(this.outerValue,P,this.outerIndex,this)},B.prototype._error=function(P){this.parent.notifyError(P),this.unsubscribe()},B.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},B}(Pe),Ze=function(C){j(B,C);function B(){return C!==null&&C.apply(this,arguments)||this}return B.prototype.notifyNext=function(P){this.destination.next(P)},B.prototype.notifyError=function(P){this.destination.error(P)},B.prototype.notifyComplete=function(){this.destination.complete()},B}(Pe),Gt=function(C){j(B,C);function B(){return C!==null&&C.apply(this,arguments)||this}return B.prototype.notifyNext=function(P,K,Y,_){this.destination.next(K)},B.prototype.notifyError=function(P){this.destination.error(P)},B.prototype.notifyComplete=function(P){this.destination.complete()},B}(Pe);function Ft(C,B){if(!B.closed){if(C instanceof Re)return C.subscribe(B);var P;try{P=nt(C)(B)}catch(K){B.error(K)}return P}}function Je(C,B,P){return P===void 0&&(P=Number.POSITIVE_INFINITY),typeof B=="function"?function(K){return K.pipe(Je(function(Y,_){return lt(C(Y,_)).pipe(tt(function(ae,ve){return B(Y,ae,_,ve)}))},P))}:(typeof B=="number"&&(P=B),function(K){return K.lift(new St(C,P))})}var St=function(){function C(B,P){P===void 0&&(P=Number.POSITIVE_INFINITY),this.project=B,this.concurrent=P}return C.prototype.call=function(B,P){return P.subscribe(new Tt(B,this.project,this.concurrent))},C}(),Tt=function(C){j(B,C);function B(P,K,Y){Y===void 0&&(Y=Number.POSITIVE_INFINITY);var _=C.call(this,P)||this;return _.project=K,_.concurrent=Y,_.hasCompleted=!1,_.buffer=[],_.active=0,_.index=0,_}return B.prototype._next=function(P){this.active<this.concurrent?this._tryNext(P):this.buffer.push(P)},B.prototype._tryNext=function(P){var K,Y=this.index++;try{K=this.project(P,Y)}catch(_){this.destination.error(_);return}this.active++,this._innerSub(K)},B.prototype._innerSub=function(P){var K=new jt(this),Y=this.destination;Y.add(K);var _=Ft(P,K);_!==K&&Y.add(_)},B.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&this.destination.complete(),this.unsubscribe()},B.prototype.notifyNext=function(P){this.destination.next(P)},B.prototype.notifyComplete=function(){var P=this.buffer;this.active--,P.length>0?this._next(P.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},B}(Ze),sr=null;function ft(C){return C===void 0&&(C=Number.POSITIVE_INFINITY),Je(Ye,C)}function dt(C,B){return B?it(C,B):new Re(ct(C))}function st(){for(var C=[],B=0;B<arguments.length;B++)C[B]=arguments[B];var P=Number.POSITIVE_INFINITY,K=null,Y=C[C.length-1];return xt(Y)?(K=C.pop(),C.length>1&&typeof C[C.length-1]=="number"&&(P=C.pop())):typeof Y=="number"&&(P=C.pop()),K===null&&C.length===1&&C[0]instanceof Re?C[0]:ft(P)(dt(C,K))}var ht=new Re(function(C){return C.complete()});function de(C){return C?Oe(C):ht}function Oe(C){return new Re(function(B){return C.schedule(function(){return B.complete()})})}function Ae(C){return new Re(function(B){var P;try{P=C()}catch(Y){B.error(Y);return}var K=P?lt(P):de();return K.subscribe(B)})}function Me(){}function Be(C,B,P){return function(Y){return Y.lift(new Ne(C,B,P))}}var Ne=function(){function C(B,P,K){this.nextOrObserver=B,this.error=P,this.complete=K}return C.prototype.call=function(B,P){return P.subscribe(new Le(B,this.nextOrObserver,this.error,this.complete))},C}(),Le=function(C){j(B,C);function B(P,K,Y,_){var ae=C.call(this,P)||this;return ae._tapNext=Me,ae._tapError=Me,ae._tapComplete=Me,ae._tapError=Y||Me,ae._tapComplete=_||Me,pe(K)?(ae._context=ae,ae._tapNext=K):K&&(ae._context=K,ae._tapNext=K.next||Me,ae._tapError=K.error||Me,ae._tapComplete=K.complete||Me),ae}return B.prototype._next=function(P){try{this._tapNext.call(this._context,P)}catch(K){this.destination.error(K);return}this.destination.next(P)},B.prototype._error=function(P){try{this._tapError.call(this._context,P)}catch(K){this.destination.error(K);return}this.destination.error(P)},B.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(P){this.destination.error(P);return}return this.destination.complete()},B}(Pe),Ot=function(){function C(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return C.prototype=Object.create(Error.prototype),C}(),ot=Ot,or=function(C){j(B,C);function B(P,K){var Y=C.call(this)||this;return Y.subject=P,Y.subscriber=K,Y.closed=!1,Y}return B.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var P=this.subject,K=P.observers;if(this.subject=null,!(!K||K.length===0||P.isStopped||P.closed)){var Y=K.indexOf(this.subscriber);Y!==-1&&K.splice(Y,1)}}},B}(Ie),Xt=function(C){j(B,C);function B(P){var K=C.call(this,P)||this;return K.destination=P,K}return B}(Pe),Yt=function(C){j(B,C);function B(){var P=C.call(this)||this;return P.observers=[],P.closed=!1,P.isStopped=!1,P.hasError=!1,P.thrownError=null,P}return B.prototype[et]=function(){return new Xt(this)},B.prototype.lift=function(P){var K=new Qt(this,this);return K.operator=P,K},B.prototype.next=function(P){if(this.closed)throw new ot;if(!this.isStopped)for(var K=this.observers,Y=K.length,_=K.slice(),ae=0;ae<Y;ae++)_[ae].next(P)},B.prototype.error=function(P){if(this.closed)throw new ot;this.hasError=!0,this.thrownError=P,this.isStopped=!0;for(var K=this.observers,Y=K.length,_=K.slice(),ae=0;ae<Y;ae++)_[ae].error(P);this.observers.length=0},B.prototype.complete=function(){if(this.closed)throw new ot;this.isStopped=!0;for(var P=this.observers,K=P.length,Y=P.slice(),_=0;_<K;_++)Y[_].complete();this.observers.length=0},B.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},B.prototype._trySubscribe=function(P){if(this.closed)throw new ot;return C.prototype._trySubscribe.call(this,P)},B.prototype._subscribe=function(P){if(this.closed)throw new ot;return this.hasError?(P.error(this.thrownError),Ie.EMPTY):this.isStopped?(P.complete(),Ie.EMPTY):(this.observers.push(P),new or(this,P))},B.prototype.asObservable=function(){var P=new Re;return P.source=this,P},B.create=function(P,K){return new Qt(P,K)},B}(Re),Qt=function(C){j(B,C);function B(P,K){var Y=C.call(this)||this;return Y.destination=P,Y.source=K,Y}return B.prototype.next=function(P){var K=this.destination;K&&K.next&&K.next(P)},B.prototype.error=function(P){var K=this.destination;K&&K.error&&this.destination.error(P)},B.prototype.complete=function(){var P=this.destination;P&&P.complete&&this.destination.complete()},B.prototype._subscribe=function(P){var K=this.source;return K?this.source.subscribe(P):Ie.EMPTY},B}(Yt);function Zt(){return function(B){return B.lift(new ur(B))}}var ur=function(){function C(B){this.connectable=B}return C.prototype.call=function(B,P){var K=this.connectable;K._refCount++;var Y=new cr(B,K),_=P.subscribe(Y);return Y.closed||(Y.connection=K.connect()),_},C}(),cr=function(C){j(B,C);function B(P,K){var Y=C.call(this,P)||this;return Y.connectable=K,Y}return B.prototype._unsubscribe=function(){var P=this.connectable;if(!P){this.connection=null;return}this.connectable=null;var K=P._refCount;if(K<=0){this.connection=null;return}if(P._refCount=K-1,K>1){this.connection=null;return}var Y=this.connection,_=P._connection;this.connection=null,_&&(!Y||_===Y)&&_.unsubscribe()},B}(Pe),ut=function(C){j(B,C);function B(P,K){var Y=C.call(this)||this;return Y.source=P,Y.subjectFactory=K,Y._refCount=0,Y._isComplete=!1,Y}return B.prototype._subscribe=function(P){return this.getSubject().subscribe(P)},B.prototype.getSubject=function(){var P=this._subject;return(!P||P.isStopped)&&(this._subject=this.subjectFactory()),this._subject},B.prototype.connect=function(){var P=this._connection;return P||(this._isComplete=!1,P=this._connection=new Ie,P.add(this.source.subscribe(new fr(this.getSubject(),this))),P.closed&&(this._connection=null,P=Ie.EMPTY)),P},B.prototype.refCount=function(){return Zt()(this)},B}(Re),lr=function(){var C=ut.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:C._subscribe},_isComplete:{value:C._isComplete,writable:!0},getSubject:{value:C.getSubject},connect:{value:C.connect},refCount:{value:C.refCount}}}(),fr=function(C){j(B,C);function B(P,K){var Y=C.call(this,P)||this;return Y.connectable=K,Y}return B.prototype._error=function(P){this._unsubscribe(),C.prototype._error.call(this,P)},B.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),C.prototype._complete.call(this)},B.prototype._unsubscribe=function(){var P=this.connectable;if(P){this.connectable=null;var K=P._connection;P._refCount=0,P._subject=null,P._connection=null,K&&K.unsubscribe()}},B}(Xt),dr=null,Dr=function(C){j(B,C);function B(P,K){var Y=C.call(this,P)||this;return Y.connectable=K,Y}return B.prototype._unsubscribe=function(){var P=this.connectable;if(!P){this.connection=null;return}this.connectable=null;var K=P._refCount;if(K<=0){this.connection=null;return}if(P._refCount=K-1,K>1){this.connection=null;return}var Y=this.connection,_=P._connection;this.connection=null,_&&(!Y||_===Y)&&_.unsubscribe()},B}(Pe);function hr(C,B){return function(K){var Y;if(typeof C=="function"?Y=C:Y=function(){return C},typeof B=="function")return K.lift(new Br(Y,B));var _=Object.create(K,lr);return _.source=K,_.subjectFactory=Y,_}}var Br=function(){function C(B,P){this.subjectFactory=B,this.selector=P}return C.prototype.call=function(B,P){var K=this.selector,Y=this.subjectFactory(),_=K(Y).subscribe(B);return _.add(P.subscribe(Y)),_},C}();function Jt(){return new Yt}function vr(){return function(C){return Zt()(hr(Jt)(C))}}var pr=function(){function C(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return C.prototype=Object.create(Error.prototype),C}(),Lt=pr;function _t(C,B){return function(K){return K.lift(new gr(C,B))}}var gr=function(){function C(B,P){this.predicate=B,this.thisArg=P}return C.prototype.call=function(B,P){return P.subscribe(new mr(B,this.predicate,this.thisArg))},C}(),mr=function(C){j(B,C);function B(P,K,Y){var _=C.call(this,P)||this;return _.predicate=K,_.thisArg=Y,_.count=0,_}return B.prototype._next=function(P){var K;try{K=this.predicate.call(this.thisArg,P,this.count++)}catch(Y){this.destination.error(Y);return}K&&this.destination.next(P)},B}(Pe),yr=function(){function C(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return C.prototype=Object.create(Error.prototype),C}(),Ge=yr;function Nr(C){return function(B){return C===0?de():B.lift(new br(C))}}var br=function(){function C(B){if(this.total=B,this.total<0)throw new Ge}return C.prototype.call=function(B,P){return P.subscribe(new Er(B,this.total))},C}(),Er=function(C){j(B,C);function B(P,K){var Y=C.call(this,P)||this;return Y.total=K,Y.count=0,Y}return B.prototype._next=function(P){var K=this.total,Y=++this.count;Y<=K&&(this.destination.next(P),Y===K&&(this.destination.complete(),this.unsubscribe()))},B}(Pe);function qt(C){return C===void 0&&(C=null),function(B){return B.lift(new er(C))}}var er=function(){function C(B){this.defaultValue=B}return C.prototype.call=function(B,P){return P.subscribe(new vt(B,this.defaultValue))},C}(),vt=function(C){j(B,C);function B(P,K){var Y=C.call(this,P)||this;return Y.defaultValue=K,Y.isEmpty=!0,Y}return B.prototype._next=function(P){this.isEmpty=!1,this.destination.next(P)},B.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},B}(Pe);function tr(C){return C===void 0&&(C=Sr),function(B){return B.lift(new rr(C))}}var rr=function(){function C(B){this.errorFactory=B}return C.prototype.call=function(B,P){return P.subscribe(new wr(B,this.errorFactory))},C}(),wr=function(C){j(B,C);function B(P,K){var Y=C.call(this,P)||this;return Y.errorFactory=K,Y.hasValue=!1,Y}return B.prototype._next=function(P){this.hasValue=!0,this.destination.next(P)},B.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var P=void 0;try{P=this.errorFactory()}catch(K){P=K}this.destination.error(P)},B}(Pe);function Sr(){return new Lt}function Tr(C,B){var P=arguments.length>=2;return function(K){return K.pipe(C?_t(function(Y,_){return C(Y,_,K)}):Ye,Nr(1),P?qt(B):tr(function(){return new Lt}))}}function Or(){return function(B){return B.lift(new Mr)}}var Mr=function(){function C(){}return C.prototype.call=function(B,P){return P.subscribe(new Pr(B))},C}(),Pr=function(C){j(B,C);function B(){return C!==null&&C.apply(this,arguments)||this}return B.prototype._next=function(P){},B}(Pe),Ar=e(48764).Buffer;const Cr=C=>Re.create(B=>{(0,h.log)("ble-verbose","start monitor "+C.uuid);function P(K){const Y=K.target;Y.value&&B.next(Ar.from(Y.value.buffer))}return C.startNotifications().then(()=>{C.addEventListener("characteristicvaluechanged",P)}),()=>{(0,h.log)("ble-verbose","end monitor "+C.uuid),C.stopNotifications()}});var nr=e(48764).Buffer;const ke=()=>{const{bluetooth:C}=navigator;if(typeof C>"u")throw new Error("web bluetooth not supported");return C},ir=()=>Re.create(C=>{const B=ke(),P=Y=>{C.next(Y.value)};B.addEventListener("availabilitychanged",P);let K=!1;return B.getAvailability().then(Y=>{K||C.next(Y)}),()=>{K=!0,B.removeEventListener("availabilitychanged",P)}}),Mt={},Ut=()=>({filters:I().map(C=>({services:[C]}))}),jr=async C=>{if(!C.gatt)throw new Error("bluetooth gatt not found");const[B]=await C.gatt.getPrimaryServices();if(!B)throw new Error("bluetooth service not found");const P=T(B.uuid);if(!P)throw new Error("bluetooth service infos not found");return[B,P]};async function kt(C,B){let P;if(typeof C=="string"){if(Mt[C])return(0,h.log)("ble-verbose","Transport in cache, using that."),Mt[C];P=await ke().requestDevice(Ut())}else P=C;P.gatt.connected||((0,h.log)("ble-verbose","not connected. connecting..."),await P.gatt.connect());const[K,Y]=await jr(P),{deviceModel:_,writeUuid:ae,notifyUuid:ve}=Y,[we,ye]=await Promise.all([K.getCharacteristic(ae),K.getCharacteristic(ve)]),Ce=Cr(ye).pipe(Be(ze=>{(0,h.log)("ble-frame","<= "+ze.toString("hex"))}),vr()),De=Ce.subscribe(),Se=new _e(P,we,Ce,_);if(!P.gatt.connected)throw new r.DisconnectedDevice;Mt[Se.id]=Se;const $e=ze=>{console.log("onDisconnect!",ze),delete Mt[Se.id],Se.notYetDisconnected=!1,De.unsubscribe(),P.removeEventListener("gattserverdisconnected",$e),(0,h.log)("ble-verbose",`BleTransport(${Se.id}) disconnected`),Se.emit("disconnect",ze)};P.addEventListener("gattserverdisconnected",$e);let pt=Date.now();try{await Se.inferMTU()}finally{Date.now()-pt<1e3&&(B=!1),B&&(await P.gatt.disconnect(),await new Promise(Rr=>setTimeout(Rr,4e3)))}return B?kt(P,!1):Se}class _e extends p.ZP{static listen(B){(0,h.log)("ble-verbose","listen...");let P;ke().requestDevice(Ut()).then(async _=>{P||(B.next({type:"add",descriptor:_}),B.complete())},_=>{B.error(new r.TransportOpenUserCancelled(_.message))});function Y(){P=!0}return{unsubscribe:Y}}static async open(B){return kt(B,!0)}constructor(B,P,K,Y){super(),this.id=void 0,this.device=void 0,this.mtuSize=20,this.writeCharacteristic=void 0,this.notifyObservable=void 0,this.notYetDisconnected=!0,this.deviceModel=void 0,this.exchange=_=>this.exchangeAtomicImpl(async()=>{try{const ae=_.toString("hex");(0,h.log)("apdu",`=> ${ae}`);const ve=await st(this.notifyObservable.pipe(l.n),(0,s.o)(this.write,_,this.mtuSize)).toPromise(),we=ve.toString("hex");return(0,h.log)("apdu",`<= ${we}`),ve}catch(ae){throw(0,h.log)("ble-error","exchange got "+String(ae)),this.notYetDisconnected&&this.device.gatt.disconnect(),ae}}),this.write=async _=>{(0,h.log)("ble-frame","=> "+_.toString("hex")),await this.writeCharacteristic.writeValue(_)},this.id=B.id,this.device=B,this.writeCharacteristic=P,this.notifyObservable=K,this.deviceModel=Y,(0,h.log)("ble-verbose",`BleTransport(${String(this.id)}) new instance`)}async inferMTU(){let B=23;if(await this.exchangeAtomicImpl(async()=>{try{B=await st(this.notifyObservable.pipe(Tr(P=>P.readUInt8(0)===8),tt(P=>P.readUInt8(5))),Ae(()=>lt(this.write(nr.from([8,0,0,0,0])))).pipe(Or())).toPromise()+3}catch(P){throw(0,h.log)("ble-error","inferMTU got "+String(P)),this.device.gatt.disconnect(),P}}),B>23){const P=B-3;(0,h.log)("ble-verbose",`BleTransport(${String(this.id)}) mtu set to ${String(P)}`),this.mtuSize=P}return this.mtuSize}setScrambleKey(){}async close(){this.exchangeBusyPromise&&await this.exchangeBusyPromise}}_e.isSupported=()=>Promise.resolve().then(ke).then(()=>!0,()=>!1),_e.observeAvailability=C=>ir.subscribe(C),_e.list=()=>Promise.resolve([]),_e.disconnect=async C=>{(0,h.log)("ble-verbose",`user disconnect(${C})`);const B=Mt[C];B&&B.device.gatt.disconnect()}},27590:function(G,f,e){"use strict";e.d(f,{ZP:function(){return g}});var p=e(17187),r=e.n(p),u=e(76358),i=e(48764).Buffer;class g{constructor(){this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new(r()),this.send=async(c,v,m,b,N=i.alloc(0),D=[u.StatusCodes.OK])=>{if(N.length>=256)throw new u.TransportError("data.length exceed 256 bytes limit. Got: "+N.length,"DataLengthTooBig");const H=await this.exchange(i.concat([i.from([c,v,m,b]),i.from([N.length]),N])),x=H.readUInt16BE(H.length-2);if(!D.some(w=>w===x))throw new u.TransportStatusError(x);return H},this.exchangeBusyPromise=void 0,this.exchangeAtomicImpl=async c=>{if(this.exchangeBusyPromise)throw new u.TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect.");let v;const m=new Promise(D=>{v=D});this.exchangeBusyPromise=m;let b=!1;const N=setTimeout(()=>{b=!0,this.emit("unresponsive")},this.unresponsiveTimeout);try{const D=await c();return b&&this.emit("responsive"),D}finally{clearTimeout(N),v&&v(),this.exchangeBusyPromise=null}},this._appAPIlock=null}exchange(c){throw new Error("exchange not implemented")}setScrambleKey(c){}close(){return Promise.resolve()}on(c,v){this._events.on(c,v)}off(c,v){this._events.removeListener(c,v)}emit(c,...v){this._events.emit(c,...v)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(c){this.exchangeTimeout=c}setExchangeUnresponsiveTimeout(c){this.unresponsiveTimeout=c}static create(c=3e3,v){return new Promise((m,b)=>{let N=!1;const D=this.listen({next:x=>{N=!0,D&&D.unsubscribe(),H&&clearTimeout(H),this.open(x.descriptor,c).then(m,b)},error:x=>{H&&clearTimeout(H),b(x)},complete:()=>{H&&clearTimeout(H),N||b(new u.TransportError(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),H=v?setTimeout(()=>{D.unsubscribe(),b(new u.TransportError(this.ErrorMessage_ListenTimeout,"ListenTimeout"))},v):null})}decorateAppAPIMethods(c,v,m){for(let b of v)c[b]=this.decorateAppAPIMethod(b,c[b],c,m)}decorateAppAPIMethod(c,v,m,b){return async(...N)=>{const{_appAPIlock:D}=this;if(D)return Promise.reject(new u.TransportError("Ledger Device is busy (lock "+D+")","TransportLocked"));try{return this._appAPIlock=c,this.setScrambleKey(b),await v.apply(m,N)}finally{this._appAPIlock=null}}}}g.isSupported=void 0,g.list=void 0,g.listen=void 0,g.open=void 0,g.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",g.ErrorMessage_NoDeviceFound="No Ledger device found"},28716:function(G,f,e){"use strict";e.r(f),e.d(f,{listen:function(){return i},log:function(){return u}});let p=0;const r=[],u=(a,c,v)=>{const m={type:a,id:String(++p),date:new Date};c&&(m.message=c),v&&(m.data=v),g(m)},i=a=>(r.push(a),()=>{const c=r.indexOf(a);c!==-1&&(r[c]=r[r.length-1],r.pop())});function g(a){for(let c=0;c<r.length;c++)try{r[c](a)}catch(v){console.error(v)}}typeof window<"u"&&(window.__ledgerLogsListen=i)},58162:function(G,f,e){"use strict";var p=e(89509).Buffer;function r(u){if(u.length>=255)throw new TypeError("Alphabet too long");for(var i=new Uint8Array(256),g=0;g<i.length;g++)i[g]=255;for(var a=0;a<u.length;a++){var c=u.charAt(a),v=c.charCodeAt(0);if(i[v]!==255)throw new TypeError(c+" is ambiguous");i[v]=a}var m=u.length,b=u.charAt(0),N=Math.log(m)/Math.log(256),D=Math.log(256)/Math.log(m);function H(O){if((Array.isArray(O)||O instanceof Uint8Array)&&(O=p.from(O)),!p.isBuffer(O))throw new TypeError("Expected Buffer");if(O.length===0)return"";for(var S=0,L=0,I=0,T=O.length;I!==T&&O[I]===0;)I++,S++;for(var s=(T-I)*D+1>>>0,l=new Uint8Array(s);I!==T;){for(var h=O[I],E=0,j=s-1;(h!==0||E<L)&&j!==-1;j--,E++)h+=256*l[j]>>>0,l[j]=h%m>>>0,h=h/m>>>0;if(h!==0)throw new Error("Non-zero carry");L=E,I++}for(var F=s-L;F!==s&&l[F]===0;)F++;for(var W=b.repeat(S);F<s;++F)W+=u.charAt(l[F]);return W}function x(O){if(typeof O!="string")throw new TypeError("Expected String");if(O.length===0)return p.alloc(0);for(var S=0,L=0,I=0;O[S]===b;)L++,S++;for(var T=(O.length-S)*N+1>>>0,s=new Uint8Array(T);O[S];){var l=i[O.charCodeAt(S)];if(l===255)return;for(var h=0,E=T-1;(l!==0||h<I)&&E!==-1;E--,h++)l+=m*s[E]>>>0,s[E]=l%256>>>0,l=l/256>>>0;if(l!==0)throw new Error("Non-zero carry");I=h,S++}for(var j=T-I;j!==T&&s[j]===0;)j++;var F=p.allocUnsafe(L+(T-j));F.fill(0,0,L);for(var W=L;j!==T;)F[W++]=s[j++];return F}function w(O){var S=x(O);if(S)return S;throw new Error("Non-base"+m+" character")}return{encode:H,decodeUnsafe:x,decode:w}}G.exports=r},92882:function(G){"use strict";for(var f="qpzry9x8gf2tvdw0s3jn54khce6mua7l",e={},p=0;p<f.length;p++){var r=f.charAt(p);if(e[r]!==void 0)throw new TypeError(r+" is ambiguous");e[r]=p}function u(x){var w=x>>25;return(x&33554431)<<5^-(w>>0&1)&996825010^-(w>>1&1)&642813549^-(w>>2&1)&513874426^-(w>>3&1)&1027748829^-(w>>4&1)&705979059}function i(x){for(var w=1,O=0;O<x.length;++O){var S=x.charCodeAt(O);if(S<33||S>126)return"Invalid prefix ("+x+")";w=u(w)^S>>5}for(w=u(w),O=0;O<x.length;++O){var L=x.charCodeAt(O);w=u(w)^L&31}return w}function g(x,w,O){if(O=O||90,x.length+7+w.length>O)throw new TypeError("Exceeds length limit");x=x.toLowerCase();var S=i(x);if(typeof S=="string")throw new Error(S);for(var L=x+"1",I=0;I<w.length;++I){var T=w[I];if(T>>5!==0)throw new Error("Non 5-bit word");S=u(S)^T,L+=f.charAt(T)}for(I=0;I<6;++I)S=u(S);for(S^=1,I=0;I<6;++I){var s=S>>(5-I)*5&31;L+=f.charAt(s)}return L}function a(x,w){if(w=w||90,x.length<8)return x+" too short";if(x.length>w)return"Exceeds length limit";var O=x.toLowerCase(),S=x.toUpperCase();if(x!==O&&x!==S)return"Mixed-case string "+x;x=O;var L=x.lastIndexOf("1");if(L===-1)return"No separator character for "+x;if(L===0)return"Missing prefix for "+x;var I=x.slice(0,L),T=x.slice(L+1);if(T.length<6)return"Data too short";var s=i(I);if(typeof s=="string")return s;for(var l=[],h=0;h<T.length;++h){var E=T.charAt(h),j=e[E];if(j===void 0)return"Unknown character "+E;s=u(s)^j,!(h+6>=T.length)&&l.push(j)}return s!==1?"Invalid checksum for "+x:{prefix:I,words:l}}function c(){var x=a.apply(null,arguments);if(typeof x=="object")return x}function v(x){var w=a.apply(null,arguments);if(typeof w=="object")return w;throw new Error(w)}function m(x,w,O,S){for(var L=0,I=0,T=(1<<O)-1,s=[],l=0;l<x.length;++l)for(L=L<<w|x[l],I+=w;I>=O;)I-=O,s.push(L>>I&T);if(S)I>0&&s.push(L<<O-I&T);else{if(I>=w)return"Excess padding";if(L<<O-I&T)return"Non-zero padding"}return s}function b(x){var w=m(x,8,5,!0);if(Array.isArray(w))return w}function N(x){var w=m(x,8,5,!0);if(Array.isArray(w))return w;throw new Error(w)}function D(x){var w=m(x,5,8,!1);if(Array.isArray(w))return w}function H(x){var w=m(x,5,8,!1);if(Array.isArray(w))return w;throw new Error(w)}G.exports={decodeUnsafe:c,decode:v,encode:g,toWordsUnsafe:b,toWords:N,fromWordsUnsafe:D,fromWords:H}},93302:function(G,f,e){var p;(function(r){"use strict";var u,i=20,g=1,a=1e6,c=1e6,v=-7,m=21,b="[big.js] ",N=b+"Invalid ",D=N+"decimal places",H=N+"rounding mode",x=b+"Division by zero",w={},O=void 0,S=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function L(){function l(h){var E=this;if(!(E instanceof l))return h===O?L():new l(h);h instanceof l?(E.s=h.s,E.e=h.e,E.c=h.c.slice()):I(E,h),E.constructor=l}return l.prototype=w,l.DP=i,l.RM=g,l.NE=v,l.PE=m,l.version="5.2.2",l}function I(l,h){var E,j,F;if(h===0&&1/h<0)h="-0";else if(!S.test(h+=""))throw Error(N+"number");for(l.s=h.charAt(0)=="-"?(h=h.slice(1),-1):1,(E=h.indexOf("."))>-1&&(h=h.replace(".","")),(j=h.search(/e/i))>0?(E<0&&(E=j),E+=+h.slice(j+1),h=h.substring(0,j)):E<0&&(E=h.length),F=h.length,j=0;j<F&&h.charAt(j)=="0";)++j;if(j==F)l.c=[l.e=0];else{for(;F>0&&h.charAt(--F)=="0";);for(l.e=E-j-1,l.c=[],E=0;j<=F;)l.c[E++]=+h.charAt(j++)}return l}function T(l,h,E,j){var F=l.c,W=l.e+h+1;if(W<F.length){if(E===1)j=F[W]>=5;else if(E===2)j=F[W]>5||F[W]==5&&(j||W<0||F[W+1]!==O||F[W-1]&1);else if(E===3)j=j||!!F[0];else if(j=!1,E!==0)throw Error(H);if(W<1)F.length=1,j?(l.e=-h,F[0]=1):F[0]=l.e=0;else{if(F.length=W--,j)for(;++F[W]>9;)F[W]=0,W--||(++l.e,F.unshift(1));for(W=F.length;!F[--W];)F.pop()}}else if(E<0||E>3||E!==~~E)throw Error(H);return l}function s(l,h,E,j){var F,W,d=l.constructor,A=!l.c[0];if(E!==O){if(E!==~~E||E<(h==3)||E>a)throw Error(h==3?N+"precision":D);for(l=new d(l),E=j-l.e,l.c.length>++j&&T(l,E,d.RM),h==2&&(j=l.e+E+1);l.c.length<j;)l.c.push(0)}if(F=l.e,W=l.c.join(""),E=W.length,h!=2&&(h==1||h==3&&j<=F||F<=d.NE||F>=d.PE))W=W.charAt(0)+(E>1?"."+W.slice(1):"")+(F<0?"e":"e+")+F;else if(F<0){for(;++F;)W="0"+W;W="0."+W}else if(F>0)if(++F>E)for(F-=E;F--;)W+="0";else F<E&&(W=W.slice(0,F)+"."+W.slice(F));else E>1&&(W=W.charAt(0)+"."+W.slice(1));return l.s<0&&(!A||h==4)?"-"+W:W}w.abs=function(){var l=new this.constructor(this);return l.s=1,l},w.cmp=function(l){var h,E=this,j=E.c,F=(l=new E.constructor(l)).c,W=E.s,d=l.s,A=E.e,k=l.e;if(!j[0]||!F[0])return j[0]?W:F[0]?-d:0;if(W!=d)return W;if(h=W<0,A!=k)return A>k^h?1:-1;for(d=(A=j.length)<(k=F.length)?A:k,W=-1;++W<d;)if(j[W]!=F[W])return j[W]>F[W]^h?1:-1;return A==k?0:A>k^h?1:-1},w.div=function(l){var h=this,E=h.constructor,j=h.c,F=(l=new E(l)).c,W=h.s==l.s?1:-1,d=E.DP;if(d!==~~d||d<0||d>a)throw Error(D);if(!F[0])throw Error(x);if(!j[0])return new E(W*0);var A,k,M,U,z,V=F.slice(),Q=A=F.length,Z=j.length,J=j.slice(0,A),X=J.length,q=l,te=q.c=[],re=0,se=d+(q.e=h.e-l.e)+1;for(q.s=W,W=se<0?0:se,V.unshift(0);X++<A;)J.push(0);do{for(M=0;M<10;M++){if(A!=(X=J.length))U=A>X?1:-1;else for(z=-1,U=0;++z<A;)if(F[z]!=J[z]){U=F[z]>J[z]?1:-1;break}if(U<0){for(k=X==A?F:V;X;){if(J[--X]<k[X]){for(z=X;z&&!J[--z];)J[z]=9;--J[z],J[X]+=10}J[X]-=k[X]}for(;!J[0];)J.shift()}else break}te[re++]=U?M:++M,J[0]&&U?J[X]=j[Q]||0:J=[j[Q]]}while((Q++<Z||J[0]!==O)&&W--);return!te[0]&&re!=1&&(te.shift(),q.e--),re>se&&T(q,d,E.RM,J[0]!==O),q},w.eq=function(l){return!this.cmp(l)},w.gt=function(l){return this.cmp(l)>0},w.gte=function(l){return this.cmp(l)>-1},w.lt=function(l){return this.cmp(l)<0},w.lte=function(l){return this.cmp(l)<1},w.minus=w.sub=function(l){var h,E,j,F,W=this,d=W.constructor,A=W.s,k=(l=new d(l)).s;if(A!=k)return l.s=-k,W.plus(l);var M=W.c.slice(),U=W.e,z=l.c,V=l.e;if(!M[0]||!z[0])return z[0]?(l.s=-k,l):new d(M[0]?W:0);if(A=U-V){for((F=A<0)?(A=-A,j=M):(V=U,j=z),j.reverse(),k=A;k--;)j.push(0);j.reverse()}else for(E=((F=M.length<z.length)?M:z).length,A=k=0;k<E;k++)if(M[k]!=z[k]){F=M[k]<z[k];break}if(F&&(j=M,M=z,z=j,l.s=-l.s),(k=(E=z.length)-(h=M.length))>0)for(;k--;)M[h++]=0;for(k=h;E>A;){if(M[--E]<z[E]){for(h=E;h&&!M[--h];)M[h]=9;--M[h],M[E]+=10}M[E]-=z[E]}for(;M[--k]===0;)M.pop();for(;M[0]===0;)M.shift(),--V;return M[0]||(l.s=1,M=[V=0]),l.c=M,l.e=V,l},w.mod=function(l){var h,E=this,j=E.constructor,F=E.s,W=(l=new j(l)).s;if(!l.c[0])throw Error(x);return E.s=l.s=1,h=l.cmp(E)==1,E.s=F,l.s=W,h?new j(E):(F=j.DP,W=j.RM,j.DP=j.RM=0,E=E.div(l),j.DP=F,j.RM=W,this.minus(E.times(l)))},w.plus=w.add=function(l){var h,E=this,j=E.constructor,F=E.s,W=(l=new j(l)).s;if(F!=W)return l.s=-W,E.minus(l);var d=E.e,A=E.c,k=l.e,M=l.c;if(!A[0]||!M[0])return M[0]?l:new j(A[0]?E:F*0);if(A=A.slice(),F=d-k){for(F>0?(k=d,h=M):(F=-F,h=A),h.reverse();F--;)h.push(0);h.reverse()}for(A.length-M.length<0&&(h=M,M=A,A=h),F=M.length,W=0;F;A[F]%=10)W=(A[--F]=A[F]+M[F]+W)/10|0;for(W&&(A.unshift(W),++k),F=A.length;A[--F]===0;)A.pop();return l.c=A,l.e=k,l},w.pow=function(l){var h=this,E=new h.constructor(1),j=E,F=l<0;if(l!==~~l||l<-c||l>c)throw Error(N+"exponent");for(F&&(l=-l);l&1&&(j=j.times(h)),l>>=1,!!l;)h=h.times(h);return F?E.div(j):j},w.round=function(l,h){var E=this.constructor;if(l===O)l=0;else if(l!==~~l||l<-a||l>a)throw Error(D);return T(new E(this),l,h===O?E.RM:h)},w.sqrt=function(){var l,h,E,j=this,F=j.constructor,W=j.s,d=j.e,A=new F(.5);if(!j.c[0])return new F(j);if(W<0)throw Error(b+"No square root");W=Math.sqrt(j+""),W===0||W===1/0?(h=j.c.join(""),h.length+d&1||(h+="0"),W=Math.sqrt(h),d=((d+1)/2|0)-(d<0||d&1),l=new F((W==1/0?"1e":(W=W.toExponential()).slice(0,W.indexOf("e")+1))+d)):l=new F(W),d=l.e+(F.DP+=4);do E=l,l=A.times(E.plus(j.div(E)));while(E.c.slice(0,d).join("")!==l.c.slice(0,d).join(""));return T(l,F.DP-=4,F.RM)},w.times=w.mul=function(l){var h,E=this,j=E.constructor,F=E.c,W=(l=new j(l)).c,d=F.length,A=W.length,k=E.e,M=l.e;if(l.s=E.s==l.s?1:-1,!F[0]||!W[0])return new j(l.s*0);for(l.e=k+M,d<A&&(h=F,F=W,W=h,M=d,d=A,A=M),h=new Array(M=d+A);M--;)h[M]=0;for(k=A;k--;){for(A=0,M=d+k;M>k;)A=h[M]+W[k]*F[M-k-1]+A,h[M--]=A%10,A=A/10|0;h[M]=(h[M]+A)%10}for(A?++l.e:h.shift(),k=h.length;!h[--k];)h.pop();return l.c=h,l},w.toExponential=function(l){return s(this,1,l,l)},w.toFixed=function(l){return s(this,2,l,this.e+l)},w.toPrecision=function(l){return s(this,3,l,l-1)},w.toString=function(){return s(this)},w.valueOf=w.toJSON=function(){return s(this,4)},u=L(),u.default=u.Big=u,p=function(){return u}.call(f,e,f,G),p!==void 0&&(G.exports=p)})(this)},77191:function(G,f,e){var p=e(58162),r="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";G.exports=p(r)},53310:function(G,f,e){"use strict";var p=e(77191),r=e(89509).Buffer;G.exports=function(u){function i(v){var m=u(v);return p.encode(r.concat([v,m],v.length+4))}function g(v){var m=v.slice(0,-4),b=v.slice(-4),N=u(m);if(!(b[0]^N[0]|b[1]^N[1]|b[2]^N[2]|b[3]^N[3]))return m}function a(v){var m=p.decodeUnsafe(v);if(!!m)return g(m)}function c(v){var m=p.decode(v),b=g(m,u);if(!b)throw new Error("Invalid checksum");return b}return{encode:i,decode:c,decodeUnsafe:a}}},58334:function(G,f,e){"use strict";var p=e(23482),r=e(53310);function u(i){var g=p("sha256").update(i).digest();return p("sha256").update(g).digest()}G.exports=r(u)},78249:function(G,f){(function(e,p){G.exports=f=p()})(this,function(){var e=e||function(p,r){var u=Object.create||function(){function w(){}return function(O){var S;return w.prototype=O,S=new w,w.prototype=null,S}}(),i={},g=i.lib={},a=g.Base=function(){return{extend:function(w){var O=u(this);return w&&O.mixIn(w),(!O.hasOwnProperty("init")||this.init===O.init)&&(O.init=function(){O.$super.init.apply(this,arguments)}),O.init.prototype=O,O.$super=this,O},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var O in w)w.hasOwnProperty(O)&&(this[O]=w[O]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=g.WordArray=a.extend({init:function(w,O){w=this.words=w||[],O!=r?this.sigBytes=O:this.sigBytes=w.length*4},toString:function(w){return(w||m).stringify(this)},concat:function(w){var O=this.words,S=w.words,L=this.sigBytes,I=w.sigBytes;if(this.clamp(),L%4)for(var T=0;T<I;T++){var s=S[T>>>2]>>>24-T%4*8&255;O[L+T>>>2]|=s<<24-(L+T)%4*8}else for(var T=0;T<I;T+=4)O[L+T>>>2]=S[T>>>2];return this.sigBytes+=I,this},clamp:function(){var w=this.words,O=this.sigBytes;w[O>>>2]&=4294967295<<32-O%4*8,w.length=p.ceil(O/4)},clone:function(){var w=a.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var O=[],S=function(l){var l=l,h=987654321,E=4294967295;return function(){h=36969*(h&65535)+(h>>16)&E,l=18e3*(l&65535)+(l>>16)&E;var j=(h<<16)+l&E;return j/=4294967296,j+=.5,j*(p.random()>.5?1:-1)}},L=0,I;L<w;L+=4){var T=S((I||p.random())*4294967296);I=T()*987654071,O.push(T()*4294967296|0)}return new c.init(O,w)}}),v=i.enc={},m=v.Hex={stringify:function(w){for(var O=w.words,S=w.sigBytes,L=[],I=0;I<S;I++){var T=O[I>>>2]>>>24-I%4*8&255;L.push((T>>>4).toString(16)),L.push((T&15).toString(16))}return L.join("")},parse:function(w){for(var O=w.length,S=[],L=0;L<O;L+=2)S[L>>>3]|=parseInt(w.substr(L,2),16)<<24-L%8*4;return new c.init(S,O/2)}},b=v.Latin1={stringify:function(w){for(var O=w.words,S=w.sigBytes,L=[],I=0;I<S;I++){var T=O[I>>>2]>>>24-I%4*8&255;L.push(String.fromCharCode(T))}return L.join("")},parse:function(w){for(var O=w.length,S=[],L=0;L<O;L++)S[L>>>2]|=(w.charCodeAt(L)&255)<<24-L%4*8;return new c.init(S,O)}},N=v.Utf8={stringify:function(w){try{return decodeURIComponent(escape(b.stringify(w)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(w){return b.parse(unescape(encodeURIComponent(w)))}},D=g.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=N.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var O=this._data,S=O.words,L=O.sigBytes,I=this.blockSize,T=I*4,s=L/T;w?s=p.ceil(s):s=p.max((s|0)-this._minBufferSize,0);var l=s*I,h=p.min(l*4,L);if(l){for(var E=0;E<l;E+=I)this._doProcessBlock(S,E);var j=S.splice(0,l);O.sigBytes-=h}return new c.init(j,h)},clone:function(){var w=a.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0}),H=g.Hasher=D.extend({cfg:a.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){D.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var O=this._doFinalize();return O},blockSize:512/32,_createHelper:function(w){return function(O,S){return new w.init(S).finalize(O)}},_createHmacHelper:function(w){return function(O,S){return new x.HMAC.init(w,S).finalize(O)}}}),x=i.algo={};return i}(Math);return e})},63465:function(G,f,e){(function(p,r){G.exports=f=r(e(78249))})(this,function(p){return p.enc.Hex})},30706:function(G,f,e){(function(p,r){G.exports=f=r(e(78249))})(this,function(p){/** @preserve
32
+ (c) 2012 by Cédric Mesnil. All rights reserved.
33
+
34
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
35
+
36
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
37
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
38
+
39
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
+ */return function(r){var u=p,i=u.lib,g=i.WordArray,a=i.Hasher,c=u.algo,v=g.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),m=g.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),b=g.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),N=g.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),D=g.create([0,1518500249,1859775393,2400959708,2840853838]),H=g.create([1352829926,1548603684,1836072691,2053994217,0]),x=c.RIPEMD160=a.extend({_doReset:function(){this._hash=g.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,l){for(var h=0;h<16;h++){var E=l+h,j=s[E];s[E]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360}var F=this._hash.words,W=D.words,d=H.words,A=v.words,k=m.words,M=b.words,U=N.words,z,V,Q,Z,J,X,q,te,re,se;X=z=F[0],q=V=F[1],te=Q=F[2],re=Z=F[3],se=J=F[4];for(var ne,h=0;h<80;h+=1)ne=z+s[l+A[h]]|0,h<16?ne+=w(V,Q,Z)+W[0]:h<32?ne+=O(V,Q,Z)+W[1]:h<48?ne+=S(V,Q,Z)+W[2]:h<64?ne+=L(V,Q,Z)+W[3]:ne+=I(V,Q,Z)+W[4],ne=ne|0,ne=T(ne,M[h]),ne=ne+J|0,z=J,J=Z,Z=T(Q,10),Q=V,V=ne,ne=X+s[l+k[h]]|0,h<16?ne+=I(q,te,re)+d[0]:h<32?ne+=L(q,te,re)+d[1]:h<48?ne+=S(q,te,re)+d[2]:h<64?ne+=O(q,te,re)+d[3]:ne+=w(q,te,re)+d[4],ne=ne|0,ne=T(ne,U[h]),ne=ne+se|0,X=se,se=re,re=T(te,10),te=q,q=ne;ne=F[1]+Q+re|0,F[1]=F[2]+Z+se|0,F[2]=F[3]+J+X|0,F[3]=F[4]+z+q|0,F[4]=F[0]+V+te|0,F[0]=ne},_doFinalize:function(){var s=this._data,l=s.words,h=this._nDataBytes*8,E=s.sigBytes*8;l[E>>>5]|=128<<24-E%32,l[(E+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,s.sigBytes=(l.length+1)*4,this._process();for(var j=this._hash,F=j.words,W=0;W<5;W++){var d=F[W];F[W]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}return j},clone:function(){var s=a.clone.call(this);return s._hash=this._hash.clone(),s}});function w(s,l,h){return s^l^h}function O(s,l,h){return s&l|~s&h}function S(s,l,h){return(s|~l)^h}function L(s,l,h){return s&h|l&~h}function I(s,l,h){return s^(l|~h)}function T(s,l){return s<<l|s>>>32-l}u.RIPEMD160=a._createHelper(x),u.HmacRIPEMD160=a._createHmacHelper(x)}(Math),p.RIPEMD160})},52153:function(G,f,e){(function(p,r){G.exports=f=r(e(78249))})(this,function(p){return function(r){var u=p,i=u.lib,g=i.WordArray,a=i.Hasher,c=u.algo,v=[],m=[];(function(){function D(O){for(var S=r.sqrt(O),L=2;L<=S;L++)if(!(O%L))return!1;return!0}function H(O){return(O-(O|0))*4294967296|0}for(var x=2,w=0;w<64;)D(x)&&(w<8&&(v[w]=H(r.pow(x,1/2))),m[w]=H(r.pow(x,1/3)),w++),x++})();var b=[],N=c.SHA256=a.extend({_doReset:function(){this._hash=new g.init(v.slice(0))},_doProcessBlock:function(D,H){for(var x=this._hash.words,w=x[0],O=x[1],S=x[2],L=x[3],I=x[4],T=x[5],s=x[6],l=x[7],h=0;h<64;h++){if(h<16)b[h]=D[H+h]|0;else{var E=b[h-15],j=(E<<25|E>>>7)^(E<<14|E>>>18)^E>>>3,F=b[h-2],W=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10;b[h]=j+b[h-7]+W+b[h-16]}var d=I&T^~I&s,A=w&O^w&S^O&S,k=(w<<30|w>>>2)^(w<<19|w>>>13)^(w<<10|w>>>22),M=(I<<26|I>>>6)^(I<<21|I>>>11)^(I<<7|I>>>25),U=l+M+d+m[h]+b[h],z=k+A;l=s,s=T,T=I,I=L+U|0,L=S,S=O,O=w,w=U+z|0}x[0]=x[0]+w|0,x[1]=x[1]+O|0,x[2]=x[2]+S|0,x[3]=x[3]+L|0,x[4]=x[4]+I|0,x[5]=x[5]+T|0,x[6]=x[6]+s|0,x[7]=x[7]+l|0},_doFinalize:function(){var D=this._data,H=D.words,x=this._nDataBytes*8,w=D.sigBytes*8;return H[w>>>5]|=128<<24-w%32,H[(w+64>>>9<<4)+14]=r.floor(x/4294967296),H[(w+64>>>9<<4)+15]=x,D.sigBytes=H.length*4,this._process(),this._hash},clone:function(){var D=a.clone.call(this);return D._hash=this._hash.clone(),D}});u.SHA256=a._createHelper(N),u.HmacSHA256=a._createHmacHelper(N)}(Math),p.SHA256})},13327:function(G,f,e){(function(p,r,u){G.exports=f=r(e(78249),e(64938))})(this,function(p){return function(r){var u=p,i=u.lib,g=i.WordArray,a=i.Hasher,c=u.x64,v=c.Word,m=u.algo,b=[],N=[],D=[];(function(){for(var w=1,O=0,S=0;S<24;S++){b[w+5*O]=(S+1)*(S+2)/2%64;var L=O%5,I=(2*w+3*O)%5;w=L,O=I}for(var w=0;w<5;w++)for(var O=0;O<5;O++)N[w+5*O]=O+(2*w+3*O)%5*5;for(var T=1,s=0;s<24;s++){for(var l=0,h=0,E=0;E<7;E++){if(T&1){var j=(1<<E)-1;j<32?h^=1<<j:l^=1<<j-32}T&128?T=T<<1^113:T<<=1}D[s]=v.create(l,h)}})();var H=[];(function(){for(var w=0;w<25;w++)H[w]=v.create()})();var x=m.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var w=this._state=[],O=0;O<25;O++)w[O]=new v.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(w,O){for(var S=this._state,L=this.blockSize/2,I=0;I<L;I++){var T=w[O+2*I],s=w[O+2*I+1];T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,s=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360;var l=S[I];l.high^=s,l.low^=T}for(var h=0;h<24;h++){for(var E=0;E<5;E++){for(var j=0,F=0,W=0;W<5;W++){var l=S[E+5*W];j^=l.high,F^=l.low}var d=H[E];d.high=j,d.low=F}for(var E=0;E<5;E++)for(var A=H[(E+4)%5],k=H[(E+1)%5],M=k.high,U=k.low,j=A.high^(M<<1|U>>>31),F=A.low^(U<<1|M>>>31),W=0;W<5;W++){var l=S[E+5*W];l.high^=j,l.low^=F}for(var z=1;z<25;z++){var l=S[z],V=l.high,Q=l.low,Z=b[z];if(Z<32)var j=V<<Z|Q>>>32-Z,F=Q<<Z|V>>>32-Z;else var j=Q<<Z-32|V>>>64-Z,F=V<<Z-32|Q>>>64-Z;var J=H[N[z]];J.high=j,J.low=F}var X=H[0],q=S[0];X.high=q.high,X.low=q.low;for(var E=0;E<5;E++)for(var W=0;W<5;W++){var z=E+5*W,l=S[z],te=H[z],re=H[(E+1)%5+5*W],se=H[(E+2)%5+5*W];l.high=te.high^~re.high&se.high,l.low=te.low^~re.low&se.low}var l=S[0],ne=D[h];l.high^=ne.high,l.low^=ne.low}},_doFinalize:function(){var w=this._data,O=w.words,S=this._nDataBytes*8,L=w.sigBytes*8,I=this.blockSize*32;O[L>>>5]|=1<<24-L%32,O[(r.ceil((L+1)/I)*I>>>5)-1]|=128,w.sigBytes=O.length*4,this._process();for(var T=this._state,s=this.cfg.outputLength/8,l=s/8,h=[],E=0;E<l;E++){var j=T[E],F=j.high,W=j.low;F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,W=(W<<8|W>>>24)&16711935|(W<<24|W>>>8)&4278255360,h.push(W),h.push(F)}return new g.init(h,s)},clone:function(){for(var w=a.clone.call(this),O=w._state=this._state.slice(0),S=0;S<25;S++)O[S]=O[S].clone();return w}});u.SHA3=a._createHelper(x),u.HmacSHA3=a._createHmacHelper(x)}(Math),p.SHA3})},64938:function(G,f,e){(function(p,r){G.exports=f=r(e(78249))})(this,function(p){return function(r){var u=p,i=u.lib,g=i.Base,a=i.WordArray,c=u.x64={},v=c.Word=g.extend({init:function(b,N){this.high=b,this.low=N}}),m=c.WordArray=g.extend({init:function(b,N){b=this.words=b||[],N!=r?this.sigBytes=N:this.sigBytes=b.length*8},toX32:function(){for(var b=this.words,N=b.length,D=[],H=0;H<N;H++){var x=b[H];D.push(x.high),D.push(x.low)}return a.create(D,this.sigBytes)},clone:function(){for(var b=g.clone.call(this),N=b.words=this.words.slice(0),D=N.length,H=0;H<D;H++)N[H]=N[H].clone();return b}})}(),p})},25981:function(G,f,e){var p=e(48764).Buffer,r=e(34155),u=e(88473),i=e(12840),g=e(35717),a=e(31852),c=p.from&&p.from!==Uint8Array.from?p.from([0]):new p([0]),v=function(x,w){x._corked?x.once("uncork",w):w()},m=function(x,w){x._autoDestroy&&x.destroy(w)},b=function(x,w){return function(O){O?m(x,O.message==="premature close"?null:O):w&&!x._ended&&x.end()}},N=function(x,w){if(!x||x._writableState&&x._writableState.finished)return w();if(x._writableState)return x.end(w);x.end(),w()},D=function(x){return new u.Readable({objectMode:!0,highWaterMark:16}).wrap(x)},H=function(x,w,O){if(!(this instanceof H))return new H(x,w,O);u.Duplex.call(this,O),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!O||O.autoDestroy!==!1,this._forwardDestroy=!O||O.destroy!==!1,this._forwardEnd=!O||O.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,x&&this.setWritable(x),w&&this.setReadable(w)};g(H,u.Duplex),H.obj=function(x,w,O){return O||(O={}),O.objectMode=!0,O.highWaterMark=16,new H(x,w,O)},H.prototype.cork=function(){++this._corked===1&&this.emit("cork")},H.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},H.prototype.setWritable=function(x){if(this._unwrite&&this._unwrite(),this.destroyed){x&&x.destroy&&x.destroy();return}if(x===null||x===!1){this.end();return}var w=this,O=i(x,{writable:!0,readable:!1},b(this,this._forwardEnd)),S=function(){var I=w._ondrain;w._ondrain=null,I&&I()},L=function(){w._writable.removeListener("drain",S),O()};this._unwrite&&r.nextTick(S),this._writable=x,this._writable.on("drain",S),this._unwrite=L,this.uncork()},H.prototype.setReadable=function(x){if(this._unread&&this._unread(),this.destroyed){x&&x.destroy&&x.destroy();return}if(x===null||x===!1){this.push(null),this.resume();return}var w=this,O=i(x,{writable:!1,readable:!0},b(this)),S=function(){w._forward()},L=function(){w.push(null)},I=function(){w._readable2.removeListener("readable",S),w._readable2.removeListener("end",L),O()};this._drained=!0,this._readable=x,this._readable2=x._readableState?x:D(x),this._readable2.on("readable",S),this._readable2.on("end",L),this._unread=I,this._forward()},H.prototype._read=function(){this._drained=!0,this._forward()},H.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var x;this._drained&&(x=a(this._readable2))!==null;)this.destroyed||(this._drained=this.push(x));this._forwarding=!1}},H.prototype.destroy=function(x){if(!this.destroyed){this.destroyed=!0;var w=this;r.nextTick(function(){w._destroy(x)})}},H.prototype._destroy=function(x){if(x){var w=this._ondrain;this._ondrain=null,w?w(x):this.emit("error",x)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},H.prototype._write=function(x,w,O){if(this.destroyed)return O();if(this._corked)return v(this,this._write.bind(this,x,w,O));if(x===c)return this._finish(O);if(!this._writable)return O();this._writable.write(x)===!1?this._ondrain=O:O()},H.prototype._finish=function(x){var w=this;this.emit("preend"),v(this,function(){N(w._forwardEnd&&w._writable,function(){w._writableState.prefinished===!1&&(w._writableState.prefinished=!0),w.emit("prefinish"),v(w,x)})})},H.prototype.end=function(x,w,O){return typeof x=="function"?this.end(null,null,x):typeof w=="function"?this.end(x,null,w):(this._ended=!0,x&&this.write(x),this._writableState.ending||this.write(c),u.Writable.prototype.end.call(this,O))},G.exports=H},12840:function(G,f,e){var p=e(34155),r=e(30778),u=function(){},i=function(c){return c.setHeader&&typeof c.abort=="function"},g=function(c){return c.stdio&&Array.isArray(c.stdio)&&c.stdio.length===3},a=function(c,v,m){if(typeof v=="function")return a(c,null,v);v||(v={}),m=r(m||u);var b=c._writableState,N=c._readableState,D=v.readable||v.readable!==!1&&c.readable,H=v.writable||v.writable!==!1&&c.writable,x=!1,w=function(){c.writable||O()},O=function(){H=!1,D||m.call(c)},S=function(){D=!1,H||m.call(c)},L=function(h){m.call(c,h?new Error("exited with error code: "+h):null)},I=function(h){m.call(c,h)},T=function(){p.nextTick(s)},s=function(){if(!x){if(D&&!(N&&N.ended&&!N.destroyed))return m.call(c,new Error("premature close"));if(H&&!(b&&b.ended&&!b.destroyed))return m.call(c,new Error("premature close"))}},l=function(){c.req.on("finish",O)};return i(c)?(c.on("complete",O),c.on("abort",T),c.req?l():c.on("request",l)):H&&!b&&(c.on("end",w),c.on("close",w)),g(c)&&c.on("exit",L),c.on("end",S),c.on("finish",O),v.error!==!1&&c.on("error",I),c.on("close",T),function(){x=!0,c.removeListener("complete",O),c.removeListener("abort",T),c.removeListener("request",l),c.req&&c.req.removeListener("finish",O),c.removeListener("end",w),c.removeListener("close",w),c.removeListener("finish",O),c.removeListener("exit",L),c.removeListener("end",S),c.removeListener("error",I),c.removeListener("close",T)}};G.exports=a},94315:function(G,f,e){var p;/*!
41
+ * is.js 0.8.0
42
+ * Author: Aras Atasaygin
43
+ */(function(r,u){p=function(){return r.is=u()}.call(f,e,f,G),p!==void 0&&(G.exports=p)})(this,function(){var r={};r.VERSION="0.8.0",r.not={},r.all={},r.any={};var u=Object.prototype.toString,i=Array.prototype.slice,g=Object.prototype.hasOwnProperty;function a(d){return function(){return!d.apply(null,i.call(arguments))}}function c(d){return function(){for(var A=N(arguments),k=A.length,M=0;M<k;M++)if(!d.call(null,A[M]))return!1;return!0}}function v(d){return function(){for(var A=N(arguments),k=A.length,M=0;M<k;M++)if(d.call(null,A[M]))return!0;return!1}}var m={"<":function(d,A){return d<A},"<=":function(d,A){return d<=A},">":function(d,A){return d>A},">=":function(d,A){return d>=A}};function b(d,A){var k=A+"",M=+(k.match(/\d+/)||NaN),U=k.match(/^[<>]=?|/)[0];return m[U]?m[U](d,M):d==M||M!==M}function N(d){var A=i.call(d),k=A.length;return k===1&&r.array(A[0])&&(A=A[0]),A}r.arguments=function(d){return u.call(d)==="[object Arguments]"||d!=null&&typeof d=="object"&&"callee"in d},r.array=Array.isArray||function(d){return u.call(d)==="[object Array]"},r.boolean=function(d){return d===!0||d===!1||u.call(d)==="[object Boolean]"},r.char=function(d){return r.string(d)&&d.length===1},r.date=function(d){return u.call(d)==="[object Date]"},r.domNode=function(d){return r.object(d)&&d.nodeType>0},r.error=function(d){return u.call(d)==="[object Error]"},r.function=function(d){return u.call(d)==="[object Function]"||typeof d=="function"},r.json=function(d){return u.call(d)==="[object Object]"},r.nan=function(d){return d!==d},r.null=function(d){return d===null},r.number=function(d){return r.not.nan(d)&&u.call(d)==="[object Number]"},r.object=function(d){return Object(d)===d},r.regexp=function(d){return u.call(d)==="[object RegExp]"},r.sameType=function(d,A){var k=u.call(d);return k!==u.call(A)?!1:k==="[object Number]"?!r.any.nan(d,A)||r.all.nan(d,A):!0},r.sameType.api=["not"],r.string=function(d){return u.call(d)==="[object String]"},r.undefined=function(d){return d===void 0},r.windowObject=function(d){return d!=null&&typeof d=="object"&&"setInterval"in d},r.empty=function(d){if(r.object(d)){var A=Object.getOwnPropertyNames(d).length;return!!(A===0||A===1&&r.array(d)||A===2&&r.arguments(d))}return d===""},r.existy=function(d){return d!=null},r.falsy=function(d){return!d},r.truthy=a(r.falsy),r.above=function(d,A){return r.all.number(d,A)&&d>A},r.above.api=["not"],r.decimal=function(d){return r.number(d)&&d%1!==0},r.equal=function(d,A){return r.all.number(d,A)?d===A&&1/d===1/A:r.all.string(d,A)||r.all.regexp(d,A)?""+d==""+A:r.all.boolean(d,A)?d===A:!1},r.equal.api=["not"],r.even=function(d){return r.number(d)&&d%2===0},r.finite=isFinite||function(d){return r.not.infinite(d)&&r.not.nan(d)},r.infinite=function(d){return d===1/0||d===-1/0},r.integer=function(d){return r.number(d)&&d%1===0},r.negative=function(d){return r.number(d)&&d<0},r.odd=function(d){return r.number(d)&&d%2===1},r.positive=function(d){return r.number(d)&&d>0},r.under=function(d,A){return r.all.number(d,A)&&d<A},r.under.api=["not"],r.within=function(d,A,k){return r.all.number(d,A,k)&&d>A&&d<k},r.within.api=["not"];var D={affirmative:/^(?:1|t(?:rue)?|y(?:es)?|ok(?:ay)?)$/,alphaNumeric:/^[A-Za-z0-9]+$/,caPostalCode:/^(?!.*[DFIOQU])[A-VXY][0-9][A-Z]\s?[0-9][A-Z][0-9]$/,creditCard:/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/,dateString:/^(1[0-2]|0?[1-9])([\/-])(3[01]|[12][0-9]|0?[1-9])(?:\2)(?:[0-9]{2})?[0-9]{2}$/,email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,eppPhone:/^\+[0-9]{1,3}\.[0-9]{4,14}(?:x.+)?$/,hexadecimal:/^(?:0x)?[0-9a-fA-F]+$/,hexColor:/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,ipv4:/^(?:(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(?:\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$/,ipv6:/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,nanpPhone:/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/,socialSecurityNumber:/^(?!000|666)[0-8][0-9]{2}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4}$/,timeString:/^(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])$/,ukPostCode:/^[A-Z]{1,2}[0-9RCHNQ][0-9A-Z]?\s?[0-9][ABD-HJLNP-UW-Z]{2}$|^[A-Z]{2}-?[0-9]{4}$/,url:/^(?:(?:https?|ftp):\/\/)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i,usZipCode:/^[0-9]{5}(?:-[0-9]{4})?$/};function H(d,A){r[d]=function(k){return A[d].test(k)}}for(var x in D)D.hasOwnProperty(x)&&H(x,D);r.ip=function(d){return r.ipv4(d)||r.ipv6(d)},r.capitalized=function(d){if(r.not.string(d))return!1;for(var A=d.split(" "),k=0;k<A.length;k++){var M=A[k];if(M.length){var U=M.charAt(0);if(U!==U.toUpperCase())return!1}}return!0},r.endWith=function(d,A){if(r.not.string(d))return!1;A+="";var k=d.length-A.length;return k>=0&&d.indexOf(A,k)===k},r.endWith.api=["not"],r.include=function(d,A){return d.indexOf(A)>-1},r.include.api=["not"],r.lowerCase=function(d){return r.string(d)&&d===d.toLowerCase()},r.palindrome=function(d){if(r.not.string(d))return!1;d=d.replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();for(var A=d.length-1,k=0,M=Math.floor(A/2);k<=M;k++)if(d.charAt(k)!==d.charAt(A-k))return!1;return!0},r.space=function(d){if(r.not.char(d))return!1;var A=d.charCodeAt(0);return A>8&&A<14||A===32},r.startWith=function(d,A){return r.string(d)&&d.indexOf(A)===0},r.startWith.api=["not"],r.upperCase=function(d){return r.string(d)&&d===d.toUpperCase()};var w=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],O=["january","february","march","april","may","june","july","august","september","october","november","december"];r.day=function(d,A){return r.date(d)&&A.toLowerCase()===w[d.getDay()]},r.day.api=["not"],r.dayLightSavingTime=function(d){var A=new Date(d.getFullYear(),0,1),k=new Date(d.getFullYear(),6,1),M=Math.max(A.getTimezoneOffset(),k.getTimezoneOffset());return d.getTimezoneOffset()<M},r.future=function(d){var A=new Date;return r.date(d)&&d.getTime()>A.getTime()},r.inDateRange=function(d,A,k){if(r.not.date(d)||r.not.date(A)||r.not.date(k))return!1;var M=d.getTime();return M>A.getTime()&&M<k.getTime()},r.inDateRange.api=["not"],r.inLastMonth=function(d){return r.inDateRange(d,new Date(new Date().setMonth(new Date().getMonth()-1)),new Date)},r.inLastWeek=function(d){return r.inDateRange(d,new Date(new Date().setDate(new Date().getDate()-7)),new Date)},r.inLastYear=function(d){return r.inDateRange(d,new Date(new Date().setFullYear(new Date().getFullYear()-1)),new Date)},r.inNextMonth=function(d){return r.inDateRange(d,new Date,new Date(new Date().setMonth(new Date().getMonth()+1)))},r.inNextWeek=function(d){return r.inDateRange(d,new Date,new Date(new Date().setDate(new Date().getDate()+7)))},r.inNextYear=function(d){return r.inDateRange(d,new Date,new Date(new Date().setFullYear(new Date().getFullYear()+1)))},r.leapYear=function(d){return r.number(d)&&(d%4===0&&d%100!==0||d%400===0)},r.month=function(d,A){return r.date(d)&&A.toLowerCase()===O[d.getMonth()]},r.month.api=["not"],r.past=function(d){var A=new Date;return r.date(d)&&d.getTime()<A.getTime()},r.quarterOfYear=function(d,A){return r.date(d)&&r.number(A)&&A===Math.floor((d.getMonth()+3)/3)},r.quarterOfYear.api=["not"],r.today=function(d){var A=new Date,k=A.toDateString();return r.date(d)&&d.toDateString()===k},r.tomorrow=function(d){var A=new Date,k=new Date(A.setDate(A.getDate()+1)).toDateString();return r.date(d)&&d.toDateString()===k},r.weekend=function(d){return r.date(d)&&(d.getDay()===6||d.getDay()===0)},r.weekday=a(r.weekend),r.year=function(d,A){return r.date(d)&&r.number(A)&&A===d.getFullYear()},r.year.api=["not"],r.yesterday=function(d){var A=new Date,k=new Date(A.setDate(A.getDate()-1)).toDateString();return r.date(d)&&d.toDateString()===k};var S=r.windowObject(typeof e.g=="object"&&e.g)&&e.g,L=r.windowObject(typeof self=="object"&&self)&&self,I=r.windowObject(typeof this=="object"&&this)&&this,T=S||L||I||Function("return this")(),s=L&&L.document,l=T.is,h=L&&L.navigator,E=(h&&h.appVersion||"").toLowerCase(),j=(h&&h.userAgent||"").toLowerCase(),F=(h&&h.vendor||"").toLowerCase();r.android=function(){return/android/.test(j)},r.android.api=["not"],r.androidPhone=function(){return/android/.test(j)&&/mobile/.test(j)},r.androidPhone.api=["not"],r.androidTablet=function(){return/android/.test(j)&&!/mobile/.test(j)},r.androidTablet.api=["not"],r.blackberry=function(){return/blackberry/.test(j)||/bb10/.test(j)},r.blackberry.api=["not"],r.chrome=function(d){var A=/google inc/.test(F)?j.match(/(?:chrome|crios)\/(\d+)/):null;return A!==null&&b(A[1],d)},r.chrome.api=["not"],r.desktop=function(){return r.not.mobile()&&r.not.tablet()},r.desktop.api=["not"],r.edge=function(d){var A=j.match(/edge\/(\d+)/);return A!==null&&b(A[1],d)},r.edge.api=["not"],r.firefox=function(d){var A=j.match(/(?:firefox|fxios)\/(\d+)/);return A!==null&&b(A[1],d)},r.firefox.api=["not"],r.ie=function(d){var A=j.match(/(?:msie |trident.+?; rv:)(\d+)/);return A!==null&&b(A[1],d)},r.ie.api=["not"],r.ios=function(){return r.iphone()||r.ipad()||r.ipod()},r.ios.api=["not"],r.ipad=function(d){var A=j.match(/ipad.+?os (\d+)/);return A!==null&&b(A[1],d)},r.ipad.api=["not"],r.iphone=function(d){var A=j.match(/iphone(?:.+?os (\d+))?/);return A!==null&&b(A[1]||1,d)},r.iphone.api=["not"],r.ipod=function(d){var A=j.match(/ipod.+?os (\d+)/);return A!==null&&b(A[1],d)},r.ipod.api=["not"],r.linux=function(){return/linux/.test(E)},r.linux.api=["not"],r.mac=function(){return/mac/.test(E)},r.mac.api=["not"],r.mobile=function(){return r.iphone()||r.ipod()||r.androidPhone()||r.blackberry()||r.windowsPhone()},r.mobile.api=["not"],r.offline=a(r.online),r.offline.api=["not"],r.online=function(){return!h||h.onLine===!0},r.online.api=["not"],r.opera=function(d){var A=j.match(/(?:^opera.+?version|opr)\/(\d+)/);return A!==null&&b(A[1],d)},r.opera.api=["not"],r.phantom=function(d){var A=j.match(/phantomjs\/(\d+)/);return A!==null&&b(A[1],d)},r.phantom.api=["not"],r.safari=function(d){var A=j.match(/version\/(\d+).+?safari/);return A!==null&&b(A[1],d)},r.safari.api=["not"],r.tablet=function(){return r.ipad()||r.androidTablet()||r.windowsTablet()},r.tablet.api=["not"],r.touchDevice=function(){return!!s&&("ontouchstart"in L||"DocumentTouch"in L&&s instanceof DocumentTouch)},r.touchDevice.api=["not"],r.windows=function(){return/win/.test(E)},r.windows.api=["not"],r.windowsPhone=function(){return r.windows()&&/phone/.test(j)},r.windowsPhone.api=["not"],r.windowsTablet=function(){return r.windows()&&r.not.windowsPhone()&&/touch/.test(j)},r.windowsTablet.api=["not"],r.propertyCount=function(d,A){if(r.not.object(d)||r.not.number(A))return!1;var k=0;for(var M in d)if(g.call(d,M)&&++k>A)return!1;return k===A},r.propertyCount.api=["not"],r.propertyDefined=function(d,A){return r.object(d)&&r.string(A)&&A in d},r.propertyDefined.api=["not"],r.inArray=function(d,A){if(r.not.array(A))return!1;for(var k=0;k<A.length;k++)if(A[k]===d)return!0;return!1},r.inArray.api=["not"],r.sorted=function(d,A){if(r.not.array(d))return!1;for(var k=m[A]||m[">="],M=1;M<d.length;M++)if(!k(d[M],d[M-1]))return!1;return!0};function W(){var d=r;for(var A in d)if(g.call(d,A)&&r.function(d[A]))for(var k=d[A].api||["not","all","any"],M=0;M<k.length;M++)k[M]==="not"&&(r.not[A]=a(r[A])),k[M]==="all"&&(r.all[A]=c(r[A])),k[M]==="any"&&(r.any[A]=v(r[A]))}return W(),r.setNamespace=function(){return T.is=l,this},r.setRegexp=function(d,A){for(var k in D)g.call(D,k)&&A===k&&(D[k]=d)},r})},64530:function(G,f){f=G.exports=e,f.getSerialize=p;function e(r,u,i,g){return JSON.stringify(r,p(u,g),i)}function p(r,u){var i=[],g=[];return u==null&&(u=function(a,c){return i[0]===c?"[Circular ~]":"[Circular ~."+g.slice(0,i.indexOf(c)).join(".")+"]"}),function(a,c){if(i.length>0){var v=i.indexOf(this);~v?i.splice(v+1):i.push(this),~v?g.splice(v,1/0,a):g.push(a),~i.indexOf(c)&&(c=u.call(this,a,c))}else i.push(c);return r==null?c:r.call(this,a,c)}}},39593:function(G,f,e){"use strict";const p=e(34411),r=Symbol("max"),u=Symbol("length"),i=Symbol("lengthCalculator"),g=Symbol("allowStale"),a=Symbol("maxAge"),c=Symbol("dispose"),v=Symbol("noDisposeOnSet"),m=Symbol("lruList"),b=Symbol("cache"),N=Symbol("updateAgeOnGet"),D=()=>1;class H{constructor(s){if(typeof s=="number"&&(s={max:s}),s||(s={}),s.max&&(typeof s.max!="number"||s.max<0))throw new TypeError("max must be a non-negative number");const l=this[r]=s.max||1/0,h=s.length||D;if(this[i]=typeof h!="function"?D:h,this[g]=s.stale||!1,s.maxAge&&typeof s.maxAge!="number")throw new TypeError("maxAge must be a number");this[a]=s.maxAge||0,this[c]=s.dispose,this[v]=s.noDisposeOnSet||!1,this[N]=s.updateAgeOnGet||!1,this.reset()}set max(s){if(typeof s!="number"||s<0)throw new TypeError("max must be a non-negative number");this[r]=s||1/0,O(this)}get max(){return this[r]}set allowStale(s){this[g]=!!s}get allowStale(){return this[g]}set maxAge(s){if(typeof s!="number")throw new TypeError("maxAge must be a non-negative number");this[a]=s,O(this)}get maxAge(){return this[a]}set lengthCalculator(s){typeof s!="function"&&(s=D),s!==this[i]&&(this[i]=s,this[u]=0,this[m].forEach(l=>{l.length=this[i](l.value,l.key),this[u]+=l.length})),O(this)}get lengthCalculator(){return this[i]}get length(){return this[u]}get itemCount(){return this[m].length}rforEach(s,l){l=l||this;for(let h=this[m].tail;h!==null;){const E=h.prev;I(this,s,h,l),h=E}}forEach(s,l){l=l||this;for(let h=this[m].head;h!==null;){const E=h.next;I(this,s,h,l),h=E}}keys(){return this[m].toArray().map(s=>s.key)}values(){return this[m].toArray().map(s=>s.value)}reset(){this[c]&&this[m]&&this[m].length&&this[m].forEach(s=>this[c](s.key,s.value)),this[b]=new Map,this[m]=new p,this[u]=0}dump(){return this[m].map(s=>w(this,s)?!1:{k:s.key,v:s.value,e:s.now+(s.maxAge||0)}).toArray().filter(s=>s)}dumpLru(){return this[m]}set(s,l,h){if(h=h||this[a],h&&typeof h!="number")throw new TypeError("maxAge must be a number");const E=h?Date.now():0,j=this[i](l,s);if(this[b].has(s)){if(j>this[r])return S(this,this[b].get(s)),!1;const d=this[b].get(s).value;return this[c]&&(this[v]||this[c](s,d.value)),d.now=E,d.maxAge=h,d.value=l,this[u]+=j-d.length,d.length=j,this.get(s),O(this),!0}const F=new L(s,l,j,E,h);return F.length>this[r]?(this[c]&&this[c](s,l),!1):(this[u]+=F.length,this[m].unshift(F),this[b].set(s,this[m].head),O(this),!0)}has(s){if(!this[b].has(s))return!1;const l=this[b].get(s).value;return!w(this,l)}get(s){return x(this,s,!0)}peek(s){return x(this,s,!1)}pop(){const s=this[m].tail;return s?(S(this,s),s.value):null}del(s){S(this,this[b].get(s))}load(s){this.reset();const l=Date.now();for(let h=s.length-1;h>=0;h--){const E=s[h],j=E.e||0;if(j===0)this.set(E.k,E.v);else{const F=j-l;F>0&&this.set(E.k,E.v,F)}}}prune(){this[b].forEach((s,l)=>x(this,l,!1))}}const x=(T,s,l)=>{const h=T[b].get(s);if(h){const E=h.value;if(w(T,E)){if(S(T,h),!T[g])return}else l&&(T[N]&&(h.value.now=Date.now()),T[m].unshiftNode(h));return E.value}},w=(T,s)=>{if(!s||!s.maxAge&&!T[a])return!1;const l=Date.now()-s.now;return s.maxAge?l>s.maxAge:T[a]&&l>T[a]},O=T=>{if(T[u]>T[r])for(let s=T[m].tail;T[u]>T[r]&&s!==null;){const l=s.prev;S(T,s),s=l}},S=(T,s)=>{if(s){const l=s.value;T[c]&&T[c](l.key,l.value),T[u]-=l.length,T[b].delete(l.key),T[m].removeNode(s)}};class L{constructor(s,l,h,E,j){this.key=s,this.value=l,this.length=h,this.now=E,this.maxAge=j||0}}const I=(T,s,l,h)=>{let E=l.value;w(T,E)&&(S(T,l),T[g]||(E=void 0)),E&&s.call(h,E.value,E.key,T)};G.exports=H},53915:function(G,f,e){var p=e(14650),r=e(70861),u=e(67435).bW,i=e(64530);G.exports=g,G.exports.serialize=G.exports.stringify=a,G.exports.parse=g;function g(c){c=c||{},c.strict=c.strict!==!1;function v(m){try{if(m)return JSON.parse(m)}catch{c.strict&&this.emit("error",new Error("Could not parse row "+m.slice(0,50)+"..."))}}return r(v,c)}function a(c){return p.obj(c,function(v,m,b){b(null,i(v)+u)})}},30778:function(G,f,e){var p=e(52479);G.exports=p(r),G.exports.strict=p(u),r.proto=r(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return u(this)},configurable:!0})});function r(i){var g=function(){return g.called?g.value:(g.called=!0,g.value=i.apply(this,arguments))};return g.called=!1,g}function u(i){var g=function(){if(g.called)throw new Error(g.onceError);return g.called=!0,g.value=i.apply(this,arguments)},a=i.name||"Function wrapped with `once`";return g.onceError=a+" shouldn't be called more than once",g.called=!1,g}},67435:function(G,f){var e;e=function(){return"LE"},e=function(){return typeof location<"u"?location.hostname:""},e=function(){return[]},e=function(){return 0},e=function(){return Number.MAX_VALUE},e=function(){return Number.MAX_VALUE},e=function(){return[]},e=function(){return"Browser"},e=function(){return typeof navigator<"u"?navigator.appVersion:""},e=e=function(){return{}},e=function(){return"javascript"},e=function(){return"browser"},e=e=function(){return"/tmp"},f.bW=`
44
+ `,e=function(){return"/"}},74286:function(G,f,e){var p=e(48764).Buffer,r=e(94676),u=e(1842);f.make=i,f.name=function(a){for(var c=Object.keys(f),v=0;v<c.length;v++)if(f[c[v]]===a)return c[v];return null},f.skip=function(a,c,v){switch(a){case 0:return r.decode(c,v),v+r.decode.bytes;case 1:return v+8;case 2:var m=r.decode(c,v);return v+r.decode.bytes+m;case 3:case 4:throw new Error("Groups are not supported");case 5:return v+4}throw new Error("Unknown wire type: "+a)},f.bytes=i(2,function a(c,v,m){var b=m,N=g(c);return r.encode(N,v,m),m+=r.encode.bytes,p.isBuffer(c)?c.copy(v,m):v.write(c,m,N),m+=N,a.bytes=m-b,v},function a(c,v){var m=v,b=r.decode(c,v);v+=r.decode.bytes;var N=c.slice(v,v+b);return v+=N.length,a.bytes=v-m,N},function(c){var v=g(c);return r.encodingLength(v)+v}),f.string=i(2,function a(c,v,m){var b=m,N=p.byteLength(c);return r.encode(N,v,m,"utf-8"),m+=r.encode.bytes,v.write(c,m,N),m+=N,a.bytes=m-b,v},function a(c,v){var m=v,b=r.decode(c,v);v+=r.decode.bytes;var N=c.toString("utf-8",v,v+b);return v+=b,a.bytes=v-m,N},function(c){var v=p.byteLength(c);return r.encodingLength(v)+v}),f.bool=i(0,function a(c,v,m){return v[m]=c?1:0,a.bytes=1,v},function a(c,v){var m=c[v]>0;return a.bytes=1,m},function(){return 1}),f.int32=i(0,function a(c,v,m){return r.encode(c<0?c+4294967296:c,v,m),a.bytes=r.encode.bytes,v},function a(c,v){var m=r.decode(c,v);return a.bytes=r.decode.bytes,m>2147483647?m-4294967296:m},function(c){return r.encodingLength(c<0?c+4294967296:c)}),f.int64=i(0,function a(c,v,m){if(c<0){var b=m+9;for(r.encode(c*-1,v,m),m+=r.encode.bytes-1,v[m]=v[m]|128;m<b-1;)m++,v[m]=255;v[b]=1,a.bytes=10}else r.encode(c,v,m),a.bytes=r.encode.bytes;return v},function a(c,v){var m=r.decode(c,v);if(m>=Math.pow(2,63)){for(var b=9;c[v+b-1]===255;)b--;b=b||9;var N=p.allocUnsafe(b);c.copy(N,0,v,v+b),N[b-1]=N[b-1]&127,m=-1*r.decode(N,0),a.bytes=10}else a.bytes=r.decode.bytes;return m},function(c){return c<0?10:r.encodingLength(c)}),f.sint32=f.sint64=i(0,u.encode,u.decode,u.encodingLength),f.uint32=f.uint64=f.enum=f.varint=i(0,r.encode,r.decode,r.encodingLength),f.fixed64=f.sfixed64=i(1,function a(c,v,m){return c.copy(v,m),a.bytes=8,v},function a(c,v){var m=c.slice(v,v+8);return a.bytes=8,m},function(){return 8}),f.double=i(1,function a(c,v,m){return v.writeDoubleLE(c,m),a.bytes=8,v},function a(c,v){var m=c.readDoubleLE(v);return a.bytes=8,m},function(){return 8}),f.fixed32=i(5,function a(c,v,m){return v.writeUInt32LE(c,m),a.bytes=4,v},function a(c,v){var m=c.readUInt32LE(v);return a.bytes=4,m},function(){return 4}),f.sfixed32=i(5,function a(c,v,m){return v.writeInt32LE(c,m),a.bytes=4,v},function a(c,v){var m=c.readInt32LE(v);return a.bytes=4,m},function(){return 4}),f.float=i(5,function a(c,v,m){return v.writeFloatLE(c,m),a.bytes=4,v},function a(c,v){var m=c.readFloatLE(v);return a.bytes=4,m},function(){return 4});function i(a,c,v,m){return c.bytes=v.bytes=0,{type:a,encode:c,decode:v,encodingLength:m}}function g(a){return p.isBuffer(a)?a.length:p.byteLength(a)}},99554:function(G,f,e){var p=e(34155),r=e(30778),u=e(12840),i=e(71156),g=function(){},a=/^v?\.0/.test(p.version),c=function(x){return typeof x=="function"},v=function(x){return!a||!i?!1:(x instanceof(i.ReadStream||g)||x instanceof(i.WriteStream||g))&&c(x.close)},m=function(x){return x.setHeader&&c(x.abort)},b=function(x,w,O,S){S=r(S);var L=!1;x.on("close",function(){L=!0}),u(x,{readable:w,writable:O},function(T){if(T)return S(T);L=!0,S()});var I=!1;return function(T){if(!L&&!I){if(I=!0,v(x))return x.close(g);if(m(x))return x.abort();if(c(x.destroy))return x.destroy();S(T||new Error("stream was destroyed"))}}},N=function(x){x()},D=function(x,w){return x.pipe(w)},H=function(){var x=Array.prototype.slice.call(arguments),w=c(x[x.length-1]||g)&&x.pop()||g;if(Array.isArray(x[0])&&(x=x[0]),x.length<2)throw new Error("pump requires two streams per minimum");var O,S=x.map(function(L,I){var T=I<x.length-1,s=I>0;return b(L,T,s,function(l){O||(O=l),l&&S.forEach(N),!T&&(S.forEach(N),w(O))})});return x.reduce(D)};G.exports=H},4850:function(G,f,e){var p=e(99554),r=e(35717),u=e(4309),i=function(a){return a.length?Array.isArray(a[0])?a[0]:Array.prototype.slice.call(a):[]},g=function(a){var c=function(){var v=i(arguments);if(!(this instanceof c))return new c(v);u.call(this,null,null,a),v.length&&this.setPipeline(v)};return r(c,u),c.prototype.setPipeline=function(){var v=i(arguments),m=this,b=!1,N=v[0],D=v[v.length-1];D=D.readable?D:null,N=N.writable?N:null;var H=function(){v[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",H),this.on("prefinish",function(){b||m.cork()}),p(v,function(x){if(m.removeListener("close",H),x)return m.destroy(x.message==="premature close"?null:x);b=!0,m._autoDestroy===!1&&(m._autoDestroy=!0),m.uncork()}),this.destroyed)return H();this.setWritable(N),this.setReadable(D)},c};G.exports=g({autoDestroy:!1,destroy:!1}),G.exports.obj=g({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16}),G.exports.ctor=g},4309:function(G,f,e){var p=e(48764).Buffer,r=e(34155),u=e(88473),i=e(12840),g=e(35717),a=e(31852),c=p.from&&p.from!==Uint8Array.from?p.from([0]):new p([0]),v=function(w,O){w._corked?w.once("uncork",O):O()},m=function(w,O){w._autoDestroy&&w.destroy(O)},b=function(w,O){return function(S){S?m(w,S.message==="premature close"?null:S):O&&!w._ended&&w.end()}},N=function(w,O){if(!w||w._writableState&&w._writableState.finished)return O();if(w._writableState)return w.end(O);w.end(),O()},D=function(){},H=function(w){return new u.Readable({objectMode:!0,highWaterMark:16}).wrap(w)},x=function(w,O,S){if(!(this instanceof x))return new x(w,O,S);u.Duplex.call(this,S),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!S||S.autoDestroy!==!1,this._forwardDestroy=!S||S.destroy!==!1,this._forwardEnd=!S||S.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,w&&this.setWritable(w),O&&this.setReadable(O)};g(x,u.Duplex),x.obj=function(w,O,S){return S||(S={}),S.objectMode=!0,S.highWaterMark=16,new x(w,O,S)},x.prototype.cork=function(){++this._corked===1&&this.emit("cork")},x.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},x.prototype.setWritable=function(w){if(this._unwrite&&this._unwrite(),this.destroyed){w&&w.destroy&&w.destroy();return}if(w===null||w===!1){this.end();return}var O=this,S=i(w,{writable:!0,readable:!1},b(this,this._forwardEnd)),L=function(){var T=O._ondrain;O._ondrain=null,T&&T()},I=function(){O._writable.removeListener("drain",L),S()};this._unwrite&&r.nextTick(L),this._writable=w,this._writable.on("drain",L),this._unwrite=I,this.uncork()},x.prototype.setReadable=function(w){if(this._unread&&this._unread(),this.destroyed){w&&w.destroy&&w.destroy();return}if(w===null||w===!1){this.push(null),this.resume();return}var O=this,S=i(w,{writable:!1,readable:!0},b(this)),L=function(){O._forward()},I=function(){O.push(null)},T=function(){O._readable2.removeListener("readable",L),O._readable2.removeListener("end",I),S()};this._drained=!0,this._readable=w,this._readable2=w._readableState?w:H(w),this._readable2.on("readable",L),this._readable2.on("end",I),this._unread=T,this._forward()},x.prototype._read=function(){this._drained=!0,this._forward()},x.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var w;this._drained&&(w=a(this._readable2))!==null;)this.destroyed||(this._drained=this.push(w));this._forwarding=!1}},x.prototype.destroy=function(w,O){if(O||(O=D),this.destroyed)return O(null);this.destroyed=!0;var S=this;r.nextTick(function(){S._destroy(w),O(null)})},x.prototype._destroy=function(w){if(w){var O=this._ondrain;this._ondrain=null,O?O(w):this.emit("error",w)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},x.prototype._write=function(w,O,S){if(!this.destroyed){if(this._corked)return v(this,this._write.bind(this,w,O,S));if(w===c)return this._finish(S);if(!this._writable)return S();this._writable.write(w)===!1?this._ondrain=S:this.destroyed||S()}},x.prototype._finish=function(w){var O=this;this.emit("preend"),v(this,function(){N(O._forwardEnd&&O._writable,function(){O._writableState.prefinished===!1&&(O._writableState.prefinished=!0),O.emit("prefinish"),v(O,w)})})},x.prototype.end=function(w,O,S){return typeof w=="function"?this.end(null,null,w):typeof O=="function"?this.end(w,null,O):(this._ended=!0,w&&this.write(w),!this._writableState.ending&&!this._writableState.destroyed&&this.write(c),u.Writable.prototype.end.call(this,S))},G.exports=x},80064:function(G,f,e){var p=e(34155),r=e(48764).Buffer,u,i;(function(g){"use strict";u=[],i=function(){return a}.apply(f,u),i!==void 0&&(G.exports=i);function a(m,b){if(b=b||{type:"Array"},typeof p<"u"&&typeof p.pid=="number"&&p.versions&&p.versions.node)return c(m,b);var N=window.crypto||window.msCrypto;if(!N)throw new Error("Your browser does not support window.crypto.");return v(m,b)}function c(m,b){var N=e(83954),D=N.randomBytes(m);switch(b.type){case"Array":return[].slice.call(D);case"Buffer":return D;case"Uint8Array":for(var H=new Uint8Array(m),x=0;x<m;++x)H[x]=D.readUInt8(x);return H;default:throw new Error(b.type+" is unsupported.")}}function v(m,b){var N=new Uint8Array(m),D=window.crypto||window.msCrypto;switch(D.getRandomValues(N),b.type){case"Array":return[].slice.call(N);case"Buffer":try{var H=new r(1)}catch{throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new r(N);case"Uint8Array":return N;default:throw new Error(b.type+" is unsupported.")}}a.randomArray=function(m){return a(m,{type:"Array"})},a.randomUint8Array=function(m){return a(m,{type:"Uint8Array"})},a.randomBuffer=function(m){return a(m,{type:"Buffer"})}})(this)},1842:function(G,f,e){var p=e(9365);f.encode=function r(u,i,g){u=u>=0?u*2:u*-2-1;var a=p.encode(u,i,g);return r.bytes=p.encode.bytes,a},f.decode=function r(u,i){var g=p.decode(u,i);return r.bytes=p.decode.bytes,g&1?(g+1)/-2:g/2},f.encodingLength=function(r){return p.encodingLength(r>=0?r*2:r*-2-1)}},57721:function(G){G.exports=p;var f=128,e=127;function p(r,g){var i=0,g=g||0,a=0,c=g,v,m=r.length;do{if(c>=m)throw p.bytes=0,new RangeError("Could not decode varint");v=r[c++],i+=a<28?(v&e)<<a:(v&e)*Math.pow(2,a),a+=7}while(v>=f);return p.bytes=c-g,i}},70508:function(G){G.exports=u;var f=128,e=127,p=~e,r=Math.pow(2,31);function u(i,g,a){g=g||[],a=a||0;for(var c=a;i>=r;)g[a++]=i&255|f,i/=128;for(;i&p;)g[a++]=i&255|f,i>>>=7;return g[a]=i|0,u.bytes=a-c+1,g}},9365:function(G,f,e){G.exports={encode:e(70508),decode:e(57721),encodingLength:e(48184)}},48184:function(G){var f=Math.pow(2,7),e=Math.pow(2,14),p=Math.pow(2,21),r=Math.pow(2,28),u=Math.pow(2,35),i=Math.pow(2,42),g=Math.pow(2,49),a=Math.pow(2,56),c=Math.pow(2,63);G.exports=function(v){return v<f?1:v<e?2:v<p?3:v<r?4:v<u?5:v<i?6:v<g?7:v<a?8:v<c?9:10}},70861:function(G,f,e){"use strict";var p=e(14650),r=e(32553).s;function u(v,m,b){if(this._last+=this._decoder.write(v),this._last.length>this.maxLength)return b(new Error("maximum buffer reached"));var N=this._last.split(this.matcher);this._last=N.pop();for(var D=0;D<N.length;D++)g(this,this.mapper(N[D]));b()}function i(v){this._last+=this._decoder.end(),this._last&&g(this,this.mapper(this._last)),v()}function g(v,m){m!==void 0&&v.push(m)}function a(v){return v}function c(v,m,b){switch(v=v||/\r?\n/,m=m||a,b=b||{},arguments.length){case 1:typeof v=="function"?(m=v,v=/\r?\n/):typeof v=="object"&&!(v instanceof RegExp)&&(b=v,v=/\r?\n/);break;case 2:typeof v=="function"?(b=m,m=v,v=/\r?\n/):typeof m=="object"&&(b=m,m=a)}var N=p(b,u,i);return N._readableState.objectMode=!0,N._readableState.highWaterMark&&!b.highWaterMark&&(N._readableState.highWaterMark=16),N._last="",N._decoder=new r("utf8"),N.matcher=v,N.mapper=m,N.maxLength=b.maxLength,N}G.exports=c},31852:function(G){G.exports=f;function f(p){var r=p._readableState;return r?r.objectMode?p.read():p.read(e(r)):null}function e(p){return p.buffer.length?p.buffer.head?p.buffer.head.data.length:p.buffer[0].length:p.length}},14650:function(G,f,e){var p=e(34155),r=e(88473).Transform,u=e(89539).inherits,i=e(47529);function g(v){r.call(this,v),this._destroyed=!1}u(g,r),g.prototype.destroy=function(v){if(!this._destroyed){this._destroyed=!0;var m=this;p.nextTick(function(){v&&m.emit("error",v),m.emit("close")})}};function a(v,m,b){b(null,v)}function c(v){return function(m,b,N){return typeof m=="function"&&(N=b,b=m,m={}),typeof b!="function"&&(b=a),typeof N!="function"&&(N=null),v(m,b,N)}}G.exports=c(function(v,m,b){var N=new g(v);return N._transform=m,b&&(N._flush=b),N}),G.exports.ctor=c(function(v,m,b){function N(D){if(!(this instanceof N))return new N(D);this.options=i(v,D),g.call(this,this.options)}return u(N,g),N.prototype._transform=m,b&&(N.prototype._flush=b),N}),G.exports.obj=c(function(v,m,b){var N=new g(i({objectMode:!0,highWaterMark:16},v));return N._transform=m,b&&(N._flush=b),N})},71823:function(G,f,e){"use strict";G.exports=e(49145)},63845:function(G){"use strict";var f=f||{};G.exports=f,f.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd",f.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_RESPONSE:"u2f_sign_response"},f.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},f.Request,f.Response,f.Error,f.SignRequest,f.SignResponse,f.RegisterRequest,f.RegisterResponse,f.disconnect=function(){f.port_&&f.port_.port_&&(f.port_.port_.disconnect(),f.port_=null)},f.getMessagePort=function(e){if(typeof chrome<"u"&&chrome.runtime){var p={type:f.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(f.EXTENSION_ID,p,function(){chrome.runtime.lastError?f.getIframePort_(e):f.getChromeRuntimePort_(e)})}else f.getIframePort_(e)},f.getChromeRuntimePort_=function(e){var p=chrome.runtime.connect(f.EXTENSION_ID,{includeTlsChannelId:!0});setTimeout(function(){e(null,new f.WrappedChromeRuntimePort_(p))},0)},f.WrappedChromeRuntimePort_=function(e){this.port_=e},f.WrappedChromeRuntimePort_.prototype.postMessage=function(e){this.port_.postMessage(e)},f.WrappedChromeRuntimePort_.prototype.addEventListener=function(e,p){var r=e.toLowerCase();r=="message"||r=="onmessage"?this.port_.onMessage.addListener(function(u){p({data:u})}):console.error("WrappedChromeRuntimePort only supports onMessage")},f.getIframePort_=function(e){var p="chrome-extension://"+f.EXTENSION_ID,r=document.createElement("iframe");r.src=p+"/u2f-comms.html",r.setAttribute("style","display:none"),document.body.appendChild(r);var u=!1,i=new MessageChannel,g=function(a){a.data=="ready"?(i.port1.removeEventListener("message",g),u||(u=!0,e(null,i.port1))):console.error('First event on iframe port was not "ready"')};i.port1.addEventListener("message",g),i.port1.start(),r.addEventListener("load",function(){r.contentWindow.postMessage("init",p,[i.port2])}),setTimeout(function(){u||(u=!0,e(new Error("IFrame extension not supported")))},200)},f.EXTENSION_TIMEOUT_SEC=30,f.port_=null,f.waitingForPort_=[],f.reqCounter_=0,f.callbackMap_={},f.getPortSingleton_=function(e){f.port_?e(null,f.port_):(f.waitingForPort_.length==0&&f.getMessagePort(function(p,r){for(p||(f.port_=r,f.port_.addEventListener("message",f.responseHandler_));f.waitingForPort_.length;)f.waitingForPort_.shift()(p,r)}),f.waitingForPort_.push(e))},f.responseHandler_=function(e){var p=e.data,r=p.requestId;if(!r||!f.callbackMap_[r]){console.error("Unknown or missing requestId in response.");return}var u=f.callbackMap_[r];delete f.callbackMap_[r],u(null,p.responseData)},f.isSupported=function(e){f.getPortSingleton_(function(p,r){e(!p)})},f.sign=function(e,p,r){f.getPortSingleton_(function(u,i){if(u)return p(u);var g=++f.reqCounter_;f.callbackMap_[g]=p;var a={type:f.MessageTypes.U2F_SIGN_REQUEST,signRequests:e,timeoutSeconds:typeof r<"u"?r:f.EXTENSION_TIMEOUT_SEC,requestId:g};i.postMessage(a)})},f.register=function(e,p,r,u){f.getPortSingleton_(function(i,g){if(i)return r(i);var a=++f.reqCounter_;f.callbackMap_[a]=r;var c={type:f.MessageTypes.U2F_REGISTER_REQUEST,signRequests:p,registerRequests:e,timeoutSeconds:typeof u<"u"?u:f.EXTENSION_TIMEOUT_SEC,requestId:a};g.postMessage(c)})}},49145:function(G,f,e){"use strict";G.exports=c;var p=e(63845),r=typeof navigator<"u"&&!!navigator.userAgent,u=r&&navigator.userAgent.match(/Safari\//)&&!navigator.userAgent.match(/Chrome\//),i=r&&navigator.userAgent.match(/Edge\/1[2345]/),g=null;function a(S){return g||(g=new S(function(L,I){function T(){L({u2f:null,native:!0})}if(!r||u)return T();var s=typeof window.u2f<"u"&&typeof window.u2f.sign=="function";if(s&&L({u2f:window.u2f,native:!0}),i||location.protocol==="http:"||typeof MessageChannel>"u")return T();p.isSupported(function(l){l?L({u2f:p,native:!1}):T()})})),g}function c(S){return{isSupported:N.bind(S),ensureSupport:H.bind(S),register:x.bind(S),sign:w.bind(S),ErrorCodes:c.ErrorCodes,ErrorNames:c.ErrorNames}}c.ErrorCodes={CANCELLED:-1,OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},c.ErrorNames={"-1":"CANCELLED",0:"OK",1:"OTHER_ERROR",2:"BAD_REQUEST",3:"CONFIGURATION_UNSUPPORTED",4:"DEVICE_INELIGIBLE",5:"TIMEOUT"};function v(S,L){var I=L!=null?L.errorCode:1,T=c.ErrorNames[""+I],s=new Error(S);return s.metaData={type:T,code:I},s}function m(S,L){var I={};return I.promise=new S(function(T,s){I.resolve=T,I.reject=s,L.then(T,s)}),I.promise.cancel=function(T,s){a(S).then(function(l){s&&!l.native&&l.u2f.disconnect(),I.reject(v(T,{errorCode:-1}))})},I}function b(S,L){return m(S,new S(function(I,T){try{L&&L(I,T)}catch(s){T(s)}}))}function N(){var S=this;return a(S).then(function(L){return!!L.u2f})}function D(S){if(!S.u2f)throw location.protocol==="http:"?new Error("U2F isn't supported over http, only https"):new Error("U2F not supported")}function H(){var S=this;return a(S).then(D)}function x(S,L,I){var T=this;return Array.isArray(S)||(S=[S]),typeof L=="number"&&typeof I>"u"&&(I=L,L=null),L||(L=[]),m(T,a(T).then(function(s){D(s);var l=s.native,h=s.u2f;return new T(function(E,j){function F(A){A.errorCode?j(v("Registration failed",A)):(delete A.errorCode,E(A))}function W(A,k){A?j(A):k.errorCode?j(v("Registration failed",k)):E(k)}if(l){var d=S[0].appId;h.register(d,S,L,F,I)}else h.register(S,L,W,I)})})).promise}function w(S,L){var I=this;return Array.isArray(S)||(S=[S]),m(I,a(I).then(function(T){D(T);var s=T.native,l=T.u2f;return new I(function(h,E){function j(A){A.errorCode?E(v("Sign failed",A)):(delete A.errorCode,h(A))}function F(A,k){A?E(A):k.errorCode?E(v("Sign failed",k)):h(k)}if(s){var W=S[0].appId,d=S[0].challenge;l.sign(W,d,S,j,L)}else l.sign(S,F,L)})})).promise}function O(S){c[S]=function(){if(!e.g.Promise)throw new Error("The platform doesn't natively support promises");var L=[].slice.call(arguments);return c(e.g.Promise)[S].apply(null,L)}}O("isSupported"),O("ensureSupport"),O("register"),O("sign")},55877:function(G,f,e){var p=e(23570),r=e(71171),u=r;u.v1=p,u.v4=r,G.exports=u},23570:function(G,f,e){var p=e(85217),r=e(45327),u,i,g=0,a=0;function c(v,m,b){var N=m&&b||0,D=m||[];v=v||{};var H=v.node||u,x=v.clockseq!==void 0?v.clockseq:i;if(H==null||x==null){var w=p();H==null&&(H=u=[w[0]|1,w[1],w[2],w[3],w[4],w[5]]),x==null&&(x=i=(w[6]<<8|w[7])&16383)}var O=v.msecs!==void 0?v.msecs:new Date().getTime(),S=v.nsecs!==void 0?v.nsecs:a+1,L=O-g+(S-a)/1e4;if(L<0&&v.clockseq===void 0&&(x=x+1&16383),(L<0||O>g)&&v.nsecs===void 0&&(S=0),S>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=O,a=S,i=x,O+=122192928e5;var I=((O&268435455)*1e4+S)%4294967296;D[N++]=I>>>24&255,D[N++]=I>>>16&255,D[N++]=I>>>8&255,D[N++]=I&255;var T=O/4294967296*1e4&268435455;D[N++]=T>>>8&255,D[N++]=T&255,D[N++]=T>>>24&15|16,D[N++]=T>>>16&255,D[N++]=x>>>8|128,D[N++]=x&255;for(var s=0;s<6;++s)D[N+s]=H[s];return m||r(D)}G.exports=c},26988:function(G){G.exports=p;var f=128,e=127;function p(r,g){var i=0,g=g||0,a=0,c=g,v,m=r.length;do{if(c>=m)throw p.bytes=0,new RangeError("Could not decode varint");v=r[c++],i+=a<28?(v&e)<<a:(v&e)*Math.pow(2,a),a+=7}while(v>=f);return p.bytes=c-g,i}},1312:function(G){G.exports=u;var f=128,e=127,p=~e,r=Math.pow(2,31);function u(i,g,a){g=g||[],a=a||0;for(var c=a;i>=r;)g[a++]=i&255|f,i/=128;for(;i&p;)g[a++]=i&255|f,i>>>=7;return g[a]=i|0,u.bytes=a-c+1,g}},94676:function(G,f,e){G.exports={encode:e(1312),decode:e(26988),encodingLength:e(10082)}},10082:function(G){var f=Math.pow(2,7),e=Math.pow(2,14),p=Math.pow(2,21),r=Math.pow(2,28),u=Math.pow(2,35),i=Math.pow(2,42),g=Math.pow(2,49),a=Math.pow(2,56),c=Math.pow(2,63);G.exports=function(v){return v<f?1:v<e?2:v<p?3:v<r?4:v<u?5:v<i?6:v<g?7:v<a?8:v<c?9:10}},81541:function(G,f,e){"use strict";var p=e(34155),r=e(88473).Transform,u=e(25981),i=e(74410),g=e(89509).Buffer;G.exports=c;function a(v,m,b){var N=new r({objectMode:v.objectMode});return N._write=m,N._flush=b,N}function c(v,m,b){var N,D,H=p.title==="browser",x=!!e.g.WebSocket,w=H?l:s;m&&!Array.isArray(m)&&typeof m=="object"&&(b=m,m=null,(typeof b.protocol=="string"||Array.isArray(b.protocol))&&(m=b.protocol)),b||(b={}),b.objectMode===void 0&&(b.objectMode=!(b.binary===!0||b.binary===void 0));var O=a(b,w,h);b.objectMode||(O._writev=A);var S=b.browserBufferSize||1024*512,L=b.browserBufferTimeout||1e3;typeof v=="object"?D=v:(x&&H?D=new i(v,m):D=new i(v,m,b),D.binaryType="arraybuffer");var I=typeof D.addEventListener>"u";D.readyState===D.OPEN?N=O:(N=N=u(void 0,void 0,b),b.objectMode||(N._writev=A),I?D.addEventListener("open",E):D.onopen=E),N.socket=D,I?(D.addEventListener("close",j),D.addEventListener("error",F),D.addEventListener("message",W)):(D.onclose=j,D.onerror=F,D.onmessage=W),O.on("close",d);var T=!b.objectMode;function s(k,M,U){if(D.readyState!==D.OPEN){U();return}T&&typeof k=="string"&&(k=g.from(k,"utf8")),D.send(k,U)}function l(k,M,U){if(D.bufferedAmount>S){setTimeout(l,L,k,M,U);return}T&&typeof k=="string"&&(k=g.from(k,"utf8"));try{D.send(k)}catch(z){return U(z)}U()}function h(k){D.close(),k()}function E(){N.setReadable(O),N.setWritable(O),N.emit("connect")}function j(){N.end(),N.destroy()}function F(k){N.destroy(k)}function W(k){var M=k.data;M instanceof ArrayBuffer?M=g.from(M):M=g.from(M,"utf8"),O.push(M)}function d(){D.close()}function A(k,M){for(var U=new Array(k.length),z=0;z<k.length;z++)typeof k[z].chunk=="string"?U[z]=g.from(k[z],"utf8"):U[z]=k[z].chunk;this._write(g.concat(U),"binary",M)}return N}},74410:function(G){var f=null;typeof WebSocket<"u"?f=WebSocket:typeof MozWebSocket<"u"?f=MozWebSocket:typeof window<"u"&&(f=window.WebSocket||window.MozWebSocket),G.exports=f},52479:function(G){G.exports=f;function f(e,p){if(e&&p)return f(e)(p);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(u){r[u]=e[u]}),r;function r(){for(var u=new Array(arguments.length),i=0;i<u.length;i++)u[i]=arguments[i];var g=e.apply(this,u),a=u[u.length-1];return typeof g=="function"&&g!==a&&Object.keys(a).forEach(function(c){g[c]=a[c]}),g}}},49602:function(G){"use strict";G.exports=function(f){f.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},34411:function(G,f,e){"use strict";G.exports=p,p.Node=g,p.create=p;function p(a){var c=this;if(c instanceof p||(c=new p),c.tail=null,c.head=null,c.length=0,a&&typeof a.forEach=="function")a.forEach(function(b){c.push(b)});else if(arguments.length>0)for(var v=0,m=arguments.length;v<m;v++)c.push(arguments[v]);return c}p.prototype.removeNode=function(a){if(a.list!==this)throw new Error("removing node which does not belong to this list");var c=a.next,v=a.prev;return c&&(c.prev=v),v&&(v.next=c),a===this.head&&(this.head=c),a===this.tail&&(this.tail=v),a.list.length--,a.next=null,a.prev=null,a.list=null,c},p.prototype.unshiftNode=function(a){if(a!==this.head){a.list&&a.list.removeNode(a);var c=this.head;a.list=this,a.next=c,c&&(c.prev=a),this.head=a,this.tail||(this.tail=a),this.length++}},p.prototype.pushNode=function(a){if(a!==this.tail){a.list&&a.list.removeNode(a);var c=this.tail;a.list=this,a.prev=c,c&&(c.next=a),this.tail=a,this.head||(this.head=a),this.length++}},p.prototype.push=function(){for(var a=0,c=arguments.length;a<c;a++)u(this,arguments[a]);return this.length},p.prototype.unshift=function(){for(var a=0,c=arguments.length;a<c;a++)i(this,arguments[a]);return this.length},p.prototype.pop=function(){if(!!this.tail){var a=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,a}},p.prototype.shift=function(){if(!!this.head){var a=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,a}},p.prototype.forEach=function(a,c){c=c||this;for(var v=this.head,m=0;v!==null;m++)a.call(c,v.value,m,this),v=v.next},p.prototype.forEachReverse=function(a,c){c=c||this;for(var v=this.tail,m=this.length-1;v!==null;m--)a.call(c,v.value,m,this),v=v.prev},p.prototype.get=function(a){for(var c=0,v=this.head;v!==null&&c<a;c++)v=v.next;if(c===a&&v!==null)return v.value},p.prototype.getReverse=function(a){for(var c=0,v=this.tail;v!==null&&c<a;c++)v=v.prev;if(c===a&&v!==null)return v.value},p.prototype.map=function(a,c){c=c||this;for(var v=new p,m=this.head;m!==null;)v.push(a.call(c,m.value,this)),m=m.next;return v},p.prototype.mapReverse=function(a,c){c=c||this;for(var v=new p,m=this.tail;m!==null;)v.push(a.call(c,m.value,this)),m=m.prev;return v},p.prototype.reduce=function(a,c){var v,m=this.head;if(arguments.length>1)v=c;else if(this.head)m=this.head.next,v=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var b=0;m!==null;b++)v=a(v,m.value,b),m=m.next;return v},p.prototype.reduceReverse=function(a,c){var v,m=this.tail;if(arguments.length>1)v=c;else if(this.tail)m=this.tail.prev,v=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var b=this.length-1;m!==null;b--)v=a(v,m.value,b),m=m.prev;return v},p.prototype.toArray=function(){for(var a=new Array(this.length),c=0,v=this.head;v!==null;c++)a[c]=v.value,v=v.next;return a},p.prototype.toArrayReverse=function(){for(var a=new Array(this.length),c=0,v=this.tail;v!==null;c++)a[c]=v.value,v=v.prev;return a},p.prototype.slice=function(a,c){c=c||this.length,c<0&&(c+=this.length),a=a||0,a<0&&(a+=this.length);var v=new p;if(c<a||c<0)return v;a<0&&(a=0),c>this.length&&(c=this.length);for(var m=0,b=this.head;b!==null&&m<a;m++)b=b.next;for(;b!==null&&m<c;m++,b=b.next)v.push(b.value);return v},p.prototype.sliceReverse=function(a,c){c=c||this.length,c<0&&(c+=this.length),a=a||0,a<0&&(a+=this.length);var v=new p;if(c<a||c<0)return v;a<0&&(a=0),c>this.length&&(c=this.length);for(var m=this.length,b=this.tail;b!==null&&m>c;m--)b=b.prev;for(;b!==null&&m>a;m--,b=b.prev)v.push(b.value);return v},p.prototype.splice=function(a,c,...v){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);for(var m=0,b=this.head;b!==null&&m<a;m++)b=b.next;for(var N=[],m=0;b&&m<c;m++)N.push(b.value),b=this.removeNode(b);b===null&&(b=this.tail),b!==this.head&&b!==this.tail&&(b=b.prev);for(var m=0;m<v.length;m++)b=r(this,b,v[m]);return N},p.prototype.reverse=function(){for(var a=this.head,c=this.tail,v=a;v!==null;v=v.prev){var m=v.prev;v.prev=v.next,v.next=m}return this.head=c,this.tail=a,this};function r(a,c,v){var m=c===a.head?new g(v,null,c,a):new g(v,c,c.next,a);return m.next===null&&(a.tail=m),m.prev===null&&(a.head=m),a.length++,m}function u(a,c){a.tail=new g(c,a.tail,null,a),a.head||(a.head=a.tail),a.length++}function i(a,c){a.head=new g(c,null,a.head,a),a.tail||(a.tail=a.head),a.length++}function g(a,c,v,m){if(!(this instanceof g))return new g(a,c,v,m);this.list=m,this.value=a,c?(c.next=this,this.prev=c):this.prev=null,v?(v.prev=this,this.next=v):this.next=null}try{e(49602)(p)}catch{}},38416:function(G,f,e){var p=e(64062);function r(u,i,g){return i=p(i),i in u?Object.defineProperty(u,i,{value:g,enumerable:!0,configurable:!0,writable:!0}):u[i]=g,u}G.exports=r,G.exports.__esModule=!0,G.exports.default=G.exports},64836:function(G){function f(e){return e&&e.__esModule?e:{default:e}}G.exports=f,G.exports.__esModule=!0,G.exports.default=G.exports},75263:function(G,f,e){var p=e(18698).default;function r(i){if(typeof WeakMap!="function")return null;var g=new WeakMap,a=new WeakMap;return(r=function(v){return v?a:g})(i)}function u(i,g){if(!g&&i&&i.__esModule)return i;if(i===null||p(i)!=="object"&&typeof i!="function")return{default:i};var a=r(g);if(a&&a.has(i))return a.get(i);var c={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in i)if(m!=="default"&&Object.prototype.hasOwnProperty.call(i,m)){var b=v?Object.getOwnPropertyDescriptor(i,m):null;b&&(b.get||b.set)?Object.defineProperty(c,m,b):c[m]=i[m]}return c.default=i,a&&a.set(i,c),c}G.exports=u,G.exports.__esModule=!0,G.exports.default=G.exports}}]);